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-11359 Overview
The Library Bookshelves plugin for WordPress contains a Reflected Cross-Site Scripting (XSS) vulnerability affecting all versions up to and including 5.8. The flaw stems from the use of add_query_arg without appropriate URL escaping in class-bookshelves-settings.php. Unauthenticated attackers can inject arbitrary web scripts that execute when a victim clicks a crafted link. Successful exploitation can lead to session theft, administrative action forgery, or redirection to attacker-controlled resources. The vulnerability is tracked as [CWE-79] Improper Neutralization of Input During Web Page Generation.
Critical Impact
Unauthenticated attackers can execute arbitrary JavaScript in a victim's browser session by tricking an authenticated user into clicking a malicious link targeting a vulnerable WordPress site.
Affected Products
- Library Bookshelves plugin for WordPress
- All versions up to and including 5.8
- WordPress sites with the plugin activated
Discovery Timeline
- 2024-12-12 - CVE-2024-11359 published to NVD
- 2026-06-17 - Last updated in NVD database
Technical Details for CVE-2024-11359
Vulnerability Analysis
The vulnerability resides in class-bookshelves-settings.php at line 171 of version 5.8. The plugin uses the WordPress add_query_arg function to construct URLs but fails to properly escape the resulting output before rendering it in HTML context. When a page reflects the URL back into the response, attacker-supplied parameters render as executable script content in the browser.
Because the injection is reflected rather than stored, exploitation requires user interaction. An attacker crafts a URL containing malicious payload parameters, then delivers the link through phishing, social engineering, or embedded content on attacker-controlled sites. When an authenticated administrator clicks the link, the injected script executes with that user's privileges in the WordPress origin.
The scope change indicated by the CVSS vector reflects that scripts executing in the browser can affect resources beyond the vulnerable component itself, including the administrator's session and other WordPress functionality accessible in the same origin.
Root Cause
The root cause is missing output escaping around a value returned by add_query_arg. The add_query_arg function in WordPress does not sanitize existing query parameters from $_SERVER['REQUEST_URI'], so any developer using its return value in HTML output must apply esc_url or a comparable escaping function. The Library Bookshelves plugin omits this escaping step, allowing raw attacker input to reach the rendered page.
Attack Vector
Exploitation is network-based and does not require authentication, but user interaction is required. The attacker constructs a URL pointing to a vulnerable page hosted by the target site, appending crafted query parameters containing JavaScript. The victim clicks the link, the server reflects the unescaped input into the response, and the browser executes the payload in the context of the WordPress domain.
Refer to the WordPress Plugin Code Review for the specific vulnerable code path and the Wordfence Vulnerability Report for additional analysis.
Detection Methods for CVE-2024-11359
Indicators of Compromise
- Web server access logs showing requests to Library Bookshelves plugin endpoints with query parameters containing <script>, javascript:, onerror=, or URL-encoded equivalents such as %3Cscript%3E.
- Referer headers indicating traffic from external phishing domains or shortened URLs directed at plugin pages.
- Unexpected outbound requests from administrator browsers to unfamiliar third-party domains following visits to plugin pages.
Detection Strategies
- Deploy a Web Application Firewall (WAF) rule that inspects query strings on Library Bookshelves plugin URLs for script tags, event handlers, and encoded XSS payloads.
- Enable Content Security Policy (CSP) reporting to identify blocked inline script executions attributable to reflected injection attempts.
- Correlate WordPress audit log entries with web server logs to surface administrator sessions that visited plugin pages with suspicious query parameters.
Monitoring Recommendations
- Monitor plugin version inventory across managed WordPress installations and alert on hosts still running Library Bookshelves 5.8 or earlier.
- Track EPSS score changes for CVE-2024-11359 to detect shifts in exploit likelihood; current EPSS is 0.393%.
- Review email gateway telemetry for links pointing to WordPress admin URLs with encoded script payloads targeting known plugin endpoints.
How to Mitigate CVE-2024-11359
Immediate Actions Required
- Update the Library Bookshelves plugin to a version released after 5.8 that addresses this issue, as documented in the WordPress Plugin Change Log.
- Audit administrator sessions for anomalous activity that may indicate prior exploitation via a phishing link.
- Enforce administrator training on avoiding untrusted links, particularly URLs referencing WordPress admin paths.
Patch Information
The plugin author released a fix following version 5.8. Site administrators should upgrade to the latest available release through the WordPress plugin management interface. Review the change log linked above to confirm the fixed version and verify the patch modifies the vulnerable output-escaping path in class-bookshelves-settings.php.
Workarounds
- Deactivate and remove the Library Bookshelves plugin until an updated version can be installed.
- Implement a strict Content Security Policy that disallows inline scripts and restricts script sources to trusted origins.
- Configure a WAF to block requests to plugin endpoints containing HTML tags or JavaScript event handlers in query parameters.
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

