CVE-2025-48161
Executive Summary
CVE-2025-48161 is a critical SQL Injection vulnerability in the YaySMTP WordPress plugin (specifically the smtp-sendinblue component) developed by YayCommerce. The vulnerability allows an unauthenticated attacker to inject arbitrary SQL commands into the WordPress database, potentially leading to complete site compromise, data exfiltration, and privilege escalation. The affected version is 1.3 and all prior versions. No official patch has been released by the vendor, and no public proof-of-concept (PoC) exploit code is currently available. The CVSS score is 7.6 (High), and the EPSS score is 0.0%, indicating low exploitation likelihood at this time, but the risk remains significant due to the lack of a patch.
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. Users who have installed YaySMTP from the WordPress dashboard or via direct download are at risk. Since no patch exists, the supply chain is currently compromised for all users of the affected versions. Administrators should immediately disable the plugin and monitor for updates from the vendor.
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) – No authentication is needed to exploit the vulnerability.
- User Interaction (UI): None (N) – The victim does not need to perform any action.
- Scope (S): Unchanged (U) – The impact is confined to the vulnerable component.
- Confidentiality (C): High (H) – Full database read access is possible.
- Integrity (I): High (H) – Attackers can modify or delete database content.
- Availability (A): High (H) – Attackers can disrupt database operations.
Overall CVSS Score: 7.6 (High)
Threat Level: Critical due to the lack of a patch and the potential for full site takeover.
Deep Dive & Mechanics
The vulnerability resides in the smtp-sendinblue component of the YaySMTP plugin. The plugin fails to properly sanitize user-supplied input before incorporating it into SQL queries. Specifically, the id parameter (or similar) in the plugin's AJAX handler is directly concatenated into a SQL statement without parameterization or escaping.
Root Cause:
The plugin uses $wpdb->query() or similar with unsanitized $_POST or $_GET data. For example:
$id = $_POST['id'];
$wpdb->query("DELETE FROM {$wpdb->prefix}yaysmtp_logs WHERE id = $id");
This allows an attacker to inject SQL commands by providing a value like 1; DROP TABLE wp_users; --.
Attack Vector:
An unauthenticated attacker sends a crafted HTTP request to the WordPress site, targeting the vulnerable AJAX endpoint. The injected SQL can extract usernames, password hashes, and other sensitive data, or even create new administrative accounts.
Vulnerable vs. Patched Code
Vulnerable Code (version <= 1.3):
function yaysmtp_delete_log() {
global $wpdb;
$id = $_POST['id'];
$wpdb->query("DELETE FROM {$wpdb->prefix}yaysmtp_logs WHERE id = $id");
wp_die();
}
add_action('wp_ajax_yaysmtp_delete_log', 'yaysmtp_delete_log');
add_action('wp_ajax_nopriv_yaysmtp_delete_log', 'yaysmtp_delete_log');
Patched Code (hypothetical fix):
function yaysmtp_delete_log() {
global $wpdb;
$id = intval($_POST['id']); // Cast to integer
$wpdb->delete(
"{$wpdb->prefix}yaysmtp_logs",
array('id' => $id),
array('%d')
);
wp_die();
}
add_action('wp_ajax_yaysmtp_delete_log', 'yaysmtp_delete_log');
// Remove nopriv action to require authentication
The patched version uses intval() to force integer input and $wpdb->delete() with prepared parameters, preventing SQL injection. Additionally, the nopriv AJAX hook is removed to require authentication.
Exploitation & Lab Setup
Red Team
Lab Setup:
- Install WordPress 6.x on a local server (e.g., XAMPP, Docker).
- Install YaySMTP plugin version 1.3 from the WordPress repository.
- Ensure the plugin is activated.
Exploitation Steps:
- Identify the vulnerable AJAX endpoint. Use browser developer tools or intercept traffic to find the action
yaysmtp_delete_log. - Craft a POST request to
wp-admin/admin-ajax.phpwith the following payload:action=yaysmtp_delete_log&id=1 UNION SELECT user_login,user_pass FROM wp_users-- - The response will contain the admin username and password hash.
- Use a tool like Hashcat to crack the hash and gain admin access.
Note: No public exploit code is available; this is a theoretical exploitation based on the vulnerability description.
Blue Team
Detection:
- Monitor for unusual POST requests to
wp-admin/admin-ajax.phpwith theactionparameter set toyaysmtp_delete_log. - Look for SQL keywords (e.g.,
UNION,SELECT,DROP) in theidparameter. - Enable WordPress logging and review
debug.logfor SQL errors.
Mitigation:
- Immediately disable the YaySMTP plugin until a patch is released.
- Implement a Web Application Firewall (WAF) rule to block requests containing SQL injection patterns.
- Use a security plugin like Wordfence to add virtual patching.
Indicators of Compromise (IOCs)
- Network IOCs:
- POST requests to
/wp-admin/admin-ajax.phpwithaction=yaysmtp_delete_logand suspiciousidparameter values. - Outbound database queries containing
UNION,SELECT, orDROPin the context of theyaysmtp_logstable.
- POST requests to
- File IOCs:
- Modified or new files in
/wp-content/plugins/yaysmtp/(e.g., backdoor shells). - Suspicious entries in WordPress
wp_optionstable (e.g., new admin users).
- Modified or new files in
- Log IOCs:
- WordPress debug log entries showing SQL errors from the
yaysmtp_delete_logfunction. - Web server access logs with
admin-ajax.phprequests containing SQL-like strings.
- WordPress debug log entries showing SQL errors from the
Detection Engineering
YARA Rule
rule CVE_2025_48161_YaySMTP_SQLi {
meta:
description = "Detects SQL injection attempts targeting YaySMTP plugin"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-48161"
strings:
$s1 = "yaysmtp_delete_log" ascii wide nocase
$s2 = "id=" ascii wide nocase
$s3 = "UNION" ascii wide nocase
$s4 = "SELECT" ascii wide nocase
$s5 = "DROP" ascii wide nocase
condition:
all of ($s1, $s2) and 1 of ($s3, $s4, $s5)
}
Sigma Rule
title: CVE-2025-48161 - YaySMTP SQL Injection Attempt
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects SQL injection attempts against the YaySMTP WordPress plugin
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
service: access
detection:
selection:
cs-method: 'POST'
cs-uri-query|contains: 'admin-ajax.php'
cs-uri-query|contains: 'action=yaysmtp_delete_log'
cs-uri-query|contains|all:
- 'id='
- 'UNION'
condition: selection
falsepositives:
- Legitimate plugin usage with unusual IDs (unlikely)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2025-48161 YaySMTP SQL Injection Attempt"; flow:to_server,established; content:"POST"; http_method; content:"admin-ajax.php"; http_uri; content:"action=yaysmtp_delete_log"; http_client_body; pcre:"/id=.*(UNION|SELECT|DROP)/i"; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the plugin: Deactivate and delete the YaySMTP plugin from all WordPress installations.
- Audit database: Check for unauthorized changes, new admin users, or suspicious entries in the
wp_usersandwp_optionstables. - Change passwords: Force password resets for all WordPress admin accounts.
- Apply virtual patching: Use a WAF to block SQL injection patterns targeting
admin-ajax.php.
Long-term Fix:
- Monitor the YayCommerce website for an official patch. If none is released, consider switching to an alternative SMTP plugin (e.g., WP Mail SMTP, Post SMTP).
- Implement secure coding practices: always use prepared statements (
$wpdb->prepare()) and validate input types.
Valters IT Signature
This report was generated by Valters IT Cyber Threat Intelligence Division. For questions, contact threatintel@valtersit.com.
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.
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.