CVE-2017-20246 Overview
CVE-2017-20246 is an SQL injection vulnerability [CWE-89] in the KittyCatfish 2.2 plugin for WordPress. The flaw exists in the kc_ad GET parameter handled by base.css.php and kittycatfish.php. The plugin fails to escape or parameterize user-controlled input before passing it to SQL queries. Unauthenticated remote attackers can extract database contents using boolean-based blind or time-based blind injection techniques. No authentication, user interaction, or special privileges are required to trigger the vulnerability.
Critical Impact
Unauthenticated attackers can read sensitive database contents, including user credentials and session data, by injecting SQL payloads through a single GET parameter.
Affected Products
- WordPress plugin KittyCatfish version 2.2
- WordPress sites with the vulnerable plugin enabled
- All deployments exposing base.css.php or kittycatfish.php to the network
Discovery Timeline
- 2026-06-09 - CVE-2017-20246 published to NVD
- 2026-06-09 - Last updated in NVD database
Technical Details for CVE-2017-20246
Vulnerability Analysis
The KittyCatfish 2.2 plugin builds SQL queries by concatenating the value of the kc_ad GET parameter directly into query strings. Because the parameter receives no sanitization, escaping, or prepared-statement binding, an attacker can break out of the intended SQL context and append arbitrary clauses. The vulnerability is reachable over HTTP without authentication, making mass exploitation across exposed WordPress sites trivial. Public exploitation guidance is available through Exploit-DB entry 41919.
Root Cause
The root cause is improper neutralization of special elements used in an SQL command [CWE-89]. The plugin scripts base.css.php and kittycatfish.php accept the kc_ad parameter from $_GET and embed the raw value inside a database query. WordPress provides safe primitives such as $wpdb->prepare() and esc_sql(), but the plugin code bypasses these protections. The lack of input validation against expected types, such as integer IDs, allows attacker-controlled SQL syntax to reach the query parser.
Attack Vector
Exploitation requires only a crafted HTTP GET request to a URL such as /wp-content/plugins/kittycatfish/base.css.php?kc_ad=<payload>. Attackers typically use automated tools like sqlmap to deliver boolean-based blind payloads that infer data one bit at a time, or time-based blind payloads that rely on SLEEP() to detect true conditions. Extracted data commonly includes the wp_users table containing usernames and hashed passwords, secret keys, and post metadata. Reference details are available in the VulnCheck advisory for the Kitty Catfish SQL injection and the Exploit-DB entry 41919.
No verified proof-of-concept code is reproduced here. The vulnerability mechanism is straightforward unsanitized parameter concatenation into a SQL query, with exploitation steps documented in the public references above.
Detection Methods for CVE-2017-20246
Indicators of Compromise
- HTTP requests to base.css.php or kittycatfish.php containing the kc_ad parameter with SQL syntax such as UNION, SELECT, SLEEP(, AND 1=1, or hex-encoded payloads.
- Web server access logs showing repeated requests to the plugin endpoints from a single source within a short time window, consistent with sqlmap enumeration.
- Unexpected MySQL query latency or SLEEP() calls correlated with inbound requests to the KittyCatfish plugin path.
Detection Strategies
- Deploy web application firewall rules that match SQL keywords in the kc_ad query string and block on signature.
- Enable MySQL general query logging temporarily to identify queries originating from the plugin scripts that contain attacker-controlled tokens.
- Hunt historical logs for any request to /wp-content/plugins/kittycatfish/ paths and flag those carrying suspicious kc_ad values.
Monitoring Recommendations
- Alert on HTTP 200 responses to plugin endpoints with abnormally large response sizes, which can indicate successful data extraction.
- Monitor for new administrative WordPress accounts or password hash changes following suspicious plugin traffic.
- Track outbound traffic from the web server to unusual destinations after exploitation attempts, indicating data exfiltration.
How to Mitigate CVE-2017-20246
Immediate Actions Required
- Deactivate and remove the KittyCatfish 2.2 plugin from all WordPress installations until a fixed version is verified.
- Block external requests to /wp-content/plugins/kittycatfish/base.css.php and kittycatfish.php at the reverse proxy or WAF layer.
- Rotate WordPress secret keys, administrator passwords, and any database credentials that may have been exposed.
Patch Information
No vendor patch is referenced in the published advisory data. The WordPress.org plugin listing and the VulnCheck advisory should be consulted for any updated release. If no patched version is available, removing the plugin is the only reliable remediation.
Workarounds
- Remove the plugin directory entirely from wp-content/plugins/ to eliminate the vulnerable endpoints.
- Add WAF signatures that reject requests containing the kc_ad parameter with SQL metacharacters such as quotes, parentheses, or keywords like UNION and SELECT.
- Restrict access to the WordPress site at the network layer while remediation is performed.
# Configuration example: remove the vulnerable plugin
cd /var/www/html/wp-content/plugins/
rm -rf kittycatfish/
wp plugin deactivate kittycatfish --allow-root
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

