CVE-2024-54427 Overview
CVE-2024-54427 is a Cross-Site Request Forgery (CSRF) vulnerability in the Category of Posts WordPress plugin developed by ljmacphee, also known by its slug list-one-category-of-posts. The flaw affects all plugin versions up to and including 1.0. An attacker who tricks an authenticated administrator into visiting a crafted page can force the browser to submit unauthorized requests to the WordPress site, resulting in Stored Cross-Site Scripting (XSS). The injected payload persists and executes in the browsers of subsequent visitors. The weakness is classified under CWE-352 (Cross-Site Request Forgery).
Critical Impact
A successful attack chains CSRF with Stored XSS, allowing attackers to persist arbitrary JavaScript inside the WordPress admin context and hijack administrator sessions.
Affected Products
- WordPress plugin: Category of Posts (list-one-category-of-posts) by ljmacphee
- Affected versions: from n/a through <= 1.0
- WordPress sites with the plugin installed and activated
Discovery Timeline
- 2024-12-16 - CVE-2024-54427 published to NVD
- 2026-04-23 - Last updated in NVD database
Technical Details for CVE-2024-54427
Vulnerability Analysis
The Category of Posts plugin exposes administrative actions that change plugin settings without verifying the origin of the request. The plugin does not validate a WordPress nonce or check the HTTP referer before processing state-changing form submissions. As a result, an attacker can craft a malicious HTML page that auto-submits a forged request to the target WordPress site. If a logged-in administrator visits the attacker's page, the browser silently sends the request using the administrator's session cookies. The submitted values are stored in plugin configuration and later rendered to users without proper output encoding, producing a Stored XSS condition. The combination of missing CSRF protection and missing output sanitization is what elevates this from a configuration tampering issue to a script injection issue.
Root Cause
The root cause is the absence of anti-CSRF tokens on administrative form handlers in the plugin, combined with insufficient sanitization of stored plugin settings. WordPress provides wp_nonce_field() and check_admin_referer() for protecting admin actions, but the affected handlers in list-one-category-of-posts versions <= 1.0 do not call them. Untrusted input is then echoed into HTML output without escaping through helpers such as esc_attr() or esc_html().
Attack Vector
Exploitation requires network access to a victim site and user interaction from a privileged WordPress user. The attacker hosts a page containing an auto-submitting form or XMLHttpRequest targeting the vulnerable plugin endpoint. When an authenticated administrator visits the page, their browser submits the request with valid cookies. The stored payload then executes whenever the affected setting is rendered. Technical details are documented in the Patchstack Vulnerability Report.
Detection Methods for CVE-2024-54427
Indicators of Compromise
- Unexpected <script>, <iframe>, or event-handler attributes (for example onerror=, onload=) stored in plugin options inside the wp_options table
- WordPress admin POST requests to plugin endpoints with HTTP Referer headers pointing to external domains
- New or modified administrator accounts created shortly after admin browsing activity
- Outbound requests from visitor browsers to attacker-controlled domains when loading pages that render the plugin output
Detection Strategies
- Audit the wp_options table for entries belonging to list-one-category-of-posts and inspect stored values for HTML or JavaScript content
- Review web server access logs for POST requests to wp-admin/admin.php or wp-admin/options.php with referers outside the site's own domain
- Deploy a Web Application Firewall (WAF) rule that flags admin form submissions missing a valid WordPress nonce parameter
Monitoring Recommendations
- Forward WordPress access logs and PHP error logs to a centralized analytics platform for correlation against admin session activity
- Alert on stored plugin option values that contain HTML tags or JavaScript event handlers
- Monitor for changes to administrator accounts, user roles, and plugin/theme files following any suspicious admin browsing session
How to Mitigate CVE-2024-54427
Immediate Actions Required
- Deactivate and remove the list-one-category-of-posts plugin until a patched version is available, since the advisory lists all versions through 1.0 as vulnerable
- Rotate all WordPress administrator passwords and invalidate active sessions using wp_destroy_all_sessions or by changing user secret keys in wp-config.php
- Inspect plugin-related options in the database and remove any injected script content
- Audit administrator accounts and remove any unrecognized users
Patch Information
No fixed version is identified in the advisory. The vulnerability affects Category of Posts versions through 1.0. Site owners should monitor the Patchstack advisory for an updated release. Until then, removal of the plugin is the recommended mitigation.
Workarounds
- Restrict access to /wp-admin/ by IP allowlist at the web server or WAF layer to reduce CSRF exposure
- Require administrators to use separate browser profiles or browser sessions when working in WordPress to limit cross-site request risk
- Enforce a strict Content Security Policy (CSP) that blocks inline scripts and unknown external script sources to limit Stored XSS execution
- Apply WAF virtual patching rules that require a valid _wpnonce parameter on plugin admin endpoints
# Example: remove the vulnerable plugin via WP-CLI
wp plugin deactivate list-one-category-of-posts
wp plugin delete list-one-category-of-posts
# Verify no residual options remain in the database
wp option list --search='*list_one_category*'
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

