CVE-2025-6437
Executive Summary
CVE-2025-6437 is a critical unauthenticated SQL Injection vulnerability discovered in the Ads Pro Plugin - Multi-Purpose WordPress Advertising Manager for WordPress, affecting all versions up to and including 4.89. The flaw resides in the oid parameter, where insufficient input escaping and lack of prepared statements allow an attacker to inject arbitrary SQL queries. This enables unauthenticated remote attackers to extract sensitive information from the WordPress database, including user credentials, session tokens, and other confidential data. The vulnerability has a CVSS score of 7.5 (High) and is currently unpatched, posing a significant risk to all sites using the affected plugin.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
This vulnerability affects a WordPress plugin distributed through the official WordPress plugin repository and third-party marketplaces. As a WordPress ecosystem component, the plugin is typically installed via the WordPress admin dashboard or manually uploaded. The lack of a patch means that all installations remain vulnerable, and supply chain risk is elevated because site administrators may not be aware of the unpatched state. No official fix or advisory has been released by the vendor, and no OSV or GitHub advisory data is available.
CVSS Breakdown & Threat Level
- Attack Vector (AV): Network (N) – The vulnerability can be exploited remotely over the network.
- Attack Complexity (AC): Low (L) – No special conditions or complex attack sequences are required.
- Privileges Required (PR): None (N) – The attacker does not need any authentication.
- User Interaction (UI): None (N) – No user action is required for exploitation.
- Scope (S): Unchanged (U) – The impact is confined to the vulnerable component.
- Confidentiality (C): High (H) – Full database read access is possible.
- Integrity (I): None (N) – Data cannot be modified.
- Availability (A): None (N) – No denial-of-service impact.
Threat Level: High. The combination of unauthenticated access, low complexity, and high confidentiality impact makes this a critical threat for WordPress sites using the Ads Pro plugin.
Deep Dive & Mechanics
The vulnerability is a classic SQL Injection (CWE-89) in the oid parameter. The plugin likely constructs SQL queries by directly concatenating user input from the oid parameter without proper sanitization or parameterized queries. For example, a vulnerable code snippet might look like:
$oid = $_GET['oid'];
$query = "SELECT * FROM wp_ads WHERE id = $oid";
$result = $wpdb->get_results($query);
An attacker can manipulate the oid parameter to break out of the intended SQL context and inject arbitrary SQL commands. Since the plugin is unauthenticated, any visitor to the site can trigger the injection.
The injection point is likely in a publicly accessible AJAX handler or shortcode that processes the oid parameter. The attacker does not need to be logged in, making this a severe unauthenticated SQLi.
Vulnerable vs. Patched Code
Vulnerable Code (<= 4.89):
// Vulnerable: direct concatenation of user input
$oid = $_GET['oid'];
$query = "SELECT * FROM wp_ads WHERE id = $oid";
$results = $wpdb->get_results($query);
Patched Code (Hypothetical):
// Patched: use prepared statement
$oid = intval($_GET['oid']); // or use $wpdb->prepare
$query = $wpdb->prepare("SELECT * FROM wp_ads WHERE id = %d", $oid);
$results = $wpdb->get_results($query);
The patched version would either cast the input to an integer or use $wpdb->prepare() to safely bind the parameter, preventing SQL injection.
Exploitation & Lab Setup
Red Team (Attack Simulation)
Lab Environment:
- WordPress 6.x with Ads Pro Plugin version 4.89 installed.
- Local or cloud-based LAMP/LEMP stack.
- Attacker machine with
sqlmapor manual exploitation tools.
Exploitation Steps:
Identify the vulnerable endpoint. The
oidparameter is likely passed via GET to a plugin-specific AJAX action or page. Example URL:http://target.com/?ad_action=click&oid=1Test for SQL injection by injecting a single quote:
http://target.com/?ad_action=click&oid=1'If an error is returned (e.g., MySQL syntax error), the parameter is vulnerable.
Use
sqlmapfor automated exploitation:sqlmap -u "http://target.com/?ad_action=click&oid=1" --batch --dbsManual exploitation example to extract admin credentials:
http://target.com/?ad_action=click&oid=1 UNION SELECT user_login, user_pass FROM wp_users--
Note: No public exploit code is available at this time.
Blue Team (Defense & Detection)
Detection:
- Monitor web server logs for suspicious
oidparameter values containing SQL keywords (UNION, SELECT, OR, AND, etc.). - Deploy a Web Application Firewall (WAF) with rules to block SQL injection patterns.
- Use the detection rules provided in the Detection Engineering section.
Mitigation:
- Immediately disable or remove the Ads Pro plugin until a patch is released.
- Implement input validation and parameterized queries in any custom code.
- Apply virtual patching via WAF to block SQLi attempts on the
oidparameter.
Indicators of Compromise (IOCs)
- Network IOCs:
- HTTP requests to the vulnerable endpoint with abnormal
oidparameter values (e.g., containing SQL syntax). - Outbound database connections from the web server to external IPs (data exfiltration).
- HTTP requests to the vulnerable endpoint with abnormal
- File IOCs:
- Modified plugin files (though unlikely, as the vulnerability is in the original code).
- Log IOCs:
- Web server access logs showing repeated requests with
oidparameter containingUNION,SELECT,OR,AND,--,#, etc. - Database error logs showing SQL syntax errors related to the
oidparameter.
- Web server access logs showing repeated requests with
Detection Engineering
YARA Rule
rule CVE_2025_6437_Ads_Pro_SQLi {
meta:
description = "Detects SQL injection attempts targeting the oid parameter in Ads Pro plugin"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-6437"
strings:
$sqli1 = /oid=.*['\"]/ nocase
$sqli2 = /oid=.*UNION/i
$sqli3 = /oid=.*SELECT/i
$sqli4 = /oid=.*OR/i
$sqli5 = /oid=.*AND/i
$sqli6 = /oid=.*--/i
$sqli7 = /oid=.*#/i
condition:
any of ($sqli*)
}
Sigma Rule
title: CVE-2025-6437 - SQL Injection via oid Parameter in Ads Pro Plugin
id: 8a9b3c2d-1e5f-4a7b-8c9d-0e1f2a3b4c5d
status: experimental
description: Detects SQL injection attempts against the oid parameter in the Ads Pro WordPress plugin
author: Valters IT
date: 2025-04-10
references:
- https://nvd.nist.gov/vuln/detail/CVE-2025-6437
logsource:
category: webserver
product: apache
service: access_combined
detection:
selection:
cs-uri-query|contains: 'oid='
keywords:
- "'"
- "UNION"
- "SELECT"
- "OR"
- "AND"
- "--"
- "#"
condition: selection and keywords
falsepositives:
- Legitimate use of special characters in oid parameter (unlikely)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-6437 - Ads Pro SQL Injection via oid parameter"; flow:to_server; content:"oid="; http_uri; pcre:"/oid=.*['\"]|oid=.*UNION|oid=.*SELECT|oid=.*OR|oid=.*AND|oid=.*--|oid=.*#/i"; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the plugin: Deactivate and delete the Ads Pro plugin from all WordPress installations until a patch is released.
- Virtual Patching: Deploy WAF rules to block SQL injection patterns in the
oidparameter. - Database Audit: Check for signs of data exfiltration or unauthorized access in database logs.
Long-Term Actions:
- Monitor Vendor: Watch for an official patch from the plugin vendor. If none is released, consider migrating to an alternative advertising management plugin.
- Code Review: If you have custom code relying on this plugin, ensure all database queries use prepared statements.
- Update WordPress: Keep WordPress core and all other plugins updated to reduce overall attack surface.
Workarounds:
- If the plugin cannot be removed, modify the plugin code to sanitize the
oidparameter (e.g., cast to integer) as a temporary fix. However, this will be overwritten on plugin updates.
Valters IT
Securing Digital Frontiers
What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.