CVE-2025-9947 Overview
CVE-2025-9947 is a time-based SQL injection vulnerability in the Custom 404 Pro plugin for WordPress. The flaw affects all versions up to and including 3.12.0. It exists in the plugin's handling of the path parameter, where user input is not properly escaped before being concatenated into an SQL query. Authenticated attackers with Administrator-level access can append arbitrary SQL statements to existing queries. Successful exploitation allows extraction of sensitive data from the WordPress database. The vulnerability is classified under [CWE-89] (Improper Neutralization of Special Elements used in an SQL Command).
Critical Impact
Authenticated administrators can execute arbitrary SQL against the WordPress database, exposing credentials, session tokens, and other stored secrets.
Affected Products
- Custom 404 Pro plugin for WordPress — all versions up to and including 3.12.0
- WordPress sites with the plugin installed and active
- Any environment where Administrator-level accounts are shared or reachable by lower-trust operators
Discovery Timeline
- 2025-10-11 - CVE-2025-9947 published to the National Vulnerability Database
- 2026-06-17 - Last updated in NVD database
Technical Details for CVE-2025-9947
Vulnerability Analysis
The Custom 404 Pro plugin tracks 404 (Not Found) events and stores request metadata in the WordPress database. The vulnerable code path handles the path parameter supplied through the plugin's administration interface. The parameter flows into an SQL statement without adequate escaping and without use of a prepared statement with bound parameters.
Because the injection is time-based, attackers infer database contents by observing response delays produced by conditional SLEEP() calls. This blind extraction technique retrieves data one bit at a time and works even when the application returns no direct query output.
Exploitation requires Administrator-level privileges, which limits the practical attacker population. However, the vulnerability remains meaningful in multi-admin environments, in scenarios where administrator credentials are compromised through phishing or credential stuffing, and where compliance requires strict separation between administrator functions and raw database access.
Root Cause
The root cause is insufficient input sanitization combined with unsafe SQL query construction in admin/Helpers.php. The path value is inserted into a query string rather than passed through wpdb::prepare() with proper placeholders. See the WordPress Plugin File Reference for the affected code location.
Attack Vector
An authenticated administrator submits a crafted path value to the plugin endpoint that processes 404 log entries. The malicious payload closes the intended SQL literal, appends a time-based conditional, and observes the response latency to determine query truth. Repeating this pattern lets the attacker enumerate arbitrary tables and columns, including the wp_users table.
Refer to the Wordfence Vulnerability Report for additional technical context on the injection sink.
Detection Methods for CVE-2025-9947
Indicators of Compromise
- Unusually long response times on plugin administration endpoints associated with 404 log management.
- Web server or application logs containing SQL keywords such as SLEEP(, BENCHMARK(, UNION SELECT, or encoded variants within the path parameter.
- Repeated administrator-authenticated requests to the same plugin endpoint with incremental payload variations.
- New or modified wp_users rows, unexpected password hash reads, or access to wp_options containing secrets.
Detection Strategies
- Enable WordPress and PHP query logging to capture the raw SQL executed by the plugin and flag concatenated path values.
- Deploy a Web Application Firewall (WAF) rule that inspects requests to Custom 404 Pro admin endpoints for SQL metacharacters in path.
- Correlate authenticated administrator sessions with database latency spikes to identify time-based probing.
Monitoring Recommendations
- Monitor administrator login events for anomalies such as new source IPs, off-hours activity, or rapid re-authentication.
- Alert on repeated HTTP 200 responses with elevated response times to plugin admin URLs.
- Track plugin version inventory across WordPress instances to identify hosts still running 3.12.0 or earlier.
How to Mitigate CVE-2025-9947
Immediate Actions Required
- Update Custom 404 Pro to a version later than 3.12.0 once the maintainer publishes a fixed release.
- Audit WordPress administrator accounts and remove or downgrade unnecessary privileges.
- Rotate database credentials, WordPress secret keys, and administrator passwords if exploitation is suspected.
- Review database access logs for evidence of data extraction against wp_users and other sensitive tables.
Patch Information
At the time of the last NVD update, the advisory identifies all versions up to and including 3.12.0 as vulnerable. Consult the Wordfence Vulnerability Report and the plugin's WordPress.org page for the latest fixed version and changelog details before updating production sites.
Workarounds
- Deactivate and remove the Custom 404 Pro plugin until a patched version is available.
- Restrict access to the WordPress admin interface using IP allowlists, VPN gating, or reverse-proxy authentication.
- Enforce multi-factor authentication (MFA) on all administrator accounts to reduce the risk of credential-based takeover.
- Apply WAF virtual patching rules that block SQL metacharacters in the path parameter targeting plugin admin routes.
# Example: temporarily deactivate the plugin via WP-CLI
wp plugin deactivate custom-404-pro
wp plugin delete custom-404-pro
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

