Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2024-8665 Overview
CVE-2024-8665 is a Reflected Cross-Site Scripting (XSS) vulnerability in the YITH Custom Login plugin for WordPress. The flaw affects all versions up to and including 1.7.3. It stems from the use of add_query_arg without proper output escaping on the current URL inside the plugin's admin panel template.
Unauthenticated attackers can inject arbitrary JavaScript into pages rendered by the plugin. Execution requires a victim, typically an authenticated administrator, to click a crafted link. Successful exploitation runs attacker-controlled script in the victim's browser session.
Critical Impact
Reflected XSS executing in an administrator's browser can be chained to perform privileged actions, hijack sessions, or deliver follow-on payloads.
Affected Products
- YITH Custom Login plugin for WordPress, all versions through 1.7.3
- WordPress sites running the vulnerable plugin with administrators who view the plugin's panel
- Deployments where yit-common/yith-panel.php renders unsanitized query arguments
Discovery Timeline
- 2024-09-13 - CVE-2024-8665 published to the National Vulnerability Database (NVD)
- 2026-06-17 - Last updated in NVD database
Technical Details for CVE-2024-8665
Vulnerability Analysis
The vulnerability is classified under CWE-79, Improper Neutralization of Input During Web Page Generation. The affected code path lives in yit-common/yith-panel.php at line 149 of the 1.7.3 tag. The plugin calls WordPress's add_query_arg() helper to construct a URL that is then emitted into HTML output without being passed through an escaping function such as esc_url() or esc_attr().
add_query_arg() reflects the current request URI by default when no URL is passed. Attacker-supplied query string content therefore flows directly into the rendered page. Because reflection occurs on a page that administrators load, the resulting script runs with the privileges of whoever follows the crafted link.
The exploitation path requires user interaction, which limits mass automation. Reflected XSS in a plugin admin surface is still useful for targeted phishing against WordPress operators and e-commerce staff.
Root Cause
The root cause is a missing output-encoding step on data returned by add_query_arg(). WordPress documentation explicitly notes that add_query_arg() does not sanitize its output and that callers must escape the result before echoing it into HTML context. The plugin omitted that escaping call.
Attack Vector
An attacker crafts a URL to the vulnerable admin panel endpoint and appends a malicious query parameter containing HTML or JavaScript. The payload is delivered through phishing, a public post, or any medium that convinces a logged-in WordPress user to click. When the victim's browser loads the page, the plugin writes the attacker payload into the DOM and the browser executes it.
The fix shipped by the vendor is visible in the WordPress plugin repository changesets referenced below, which add escaping around the reflected URL. See the Wordfence Vulnerability Analysis and the vulnerable source line for technical specifics.
Detection Methods for CVE-2024-8665
Indicators of Compromise
- Web server access logs showing requests to YITH Custom Login admin panel URLs with suspicious query parameters containing <script, onerror=, javascript:, or URL-encoded equivalents
- Referrer headers from external sites pointing to WordPress admin paths associated with the plugin
- Unexpected administrative actions (user creation, option changes) following administrator sessions that loaded the plugin panel
Detection Strategies
- Inspect HTTP query strings bound for /wp-admin/ paths related to YITH Custom Login for HTML control characters and script tokens
- Deploy a web application firewall rule that blocks requests containing reflected XSS signatures on WordPress admin endpoints
- Audit installed plugins and flag any YITH Custom Login installation at version 1.7.3 or earlier
Monitoring Recommendations
- Alert on administrator sessions that trigger outbound requests to unfamiliar domains shortly after loading /wp-admin/ pages
- Monitor WordPress audit logs for privilege changes, option updates, or new administrator accounts created from unusual IP addresses
- Track plugin inventory across managed WordPress sites and raise findings on vulnerable versions
How to Mitigate CVE-2024-8665
Immediate Actions Required
- Update the YITH Custom Login plugin to the version that contains the patched yith-panel.php from changesets 3150123 and 3150560
- Audit administrator and editor accounts for unexpected activity since the plugin was installed
- Rotate WordPress administrator passwords and invalidate active sessions if exploitation is suspected
Patch Information
The vendor committed fixes to the WordPress plugin repository. See the first changeset (3150123) and the follow-up changeset (3150560). Install any plugin release that incorporates these commits.
Workarounds
- Deactivate the YITH Custom Login plugin until the patched version can be installed
- Restrict /wp-admin/ access by IP allowlist at the web server or WAF layer to limit who can be targeted with crafted links
- Enforce a strict Content Security Policy on WordPress admin pages to reduce the impact of injected inline script
# Example WAF rule concept: block script-like payloads on wp-admin query strings
SecRule REQUEST_URI "@contains /wp-admin/" \
"chain,deny,status:403,id:1008665,msg:'Reflected XSS attempt on wp-admin'"
SecRule ARGS "@rx (?i)(<script|onerror=|javascript:)" "t:urlDecodeUni"
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

