CVE-2025-1669
Executive Summary
CVE-2025-1669 is a critical SQL Injection vulnerability discovered in the WPSchoolPress WordPress plugin (versions up to and including 2.2.17). The flaw resides in the addNotify AJAX action, where user-supplied parameters are not properly escaped and the SQL query is not adequately prepared. This allows authenticated attackers with at least teacher-level privileges to inject arbitrary SQL commands into existing queries, leading to the extraction of sensitive information from the WordPress database, including user credentials, personal data, and site configuration.
As a WordPress ecosystem vulnerability, this issue directly impacts sites running the WPSchoolPress plugin. The vulnerability is classified as CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection'). With a CVSS score of 6.5 (Medium), the attack complexity is low, but it requires authenticated access with teacher-level permissions. The EPSS score of 0.0% indicates a low probability of exploitation in the wild at this time, but the risk remains significant for targeted attacks.
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 are advised to monitor for updates from the vendor (Wpschoolpress) and apply patches as soon as they become available. Since the patch status is currently unknown, manual mitigation measures are necessary.
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 are required for exploitation.
- Privileges Required (PR): High (H) – The attacker must have teacher-level or higher access to the WordPress site.
- User Interaction (UI): None (N) – No user interaction is needed.
- Scope (S): Unchanged (U) – The vulnerability does not affect other components.
- Confidentiality (C): High (H) – Sensitive data can be fully extracted.
- Integrity (I): High (H) – Data can be modified or deleted.
- Availability (A): High (H) – The database can be disrupted.
Threat Level: Medium (6.5) – While the CVSS score is medium, the potential for data exfiltration and privilege escalation makes this a serious threat for affected WordPress sites.
Deep Dive & Mechanics
The vulnerability exists in the addNotify action handler within the WPSchoolPress plugin. The plugin fails to properly sanitize user-supplied parameters before incorporating them into SQL queries. Specifically, the $notify_data parameter (or similar) is directly concatenated into an SQL INSERT or UPDATE statement without using prepared statements or parameterized queries.
Technical Flow:
- An authenticated teacher sends a POST request to
/wp-admin/admin-ajax.phpwithaction=addNotifyand malicious payload in thenotify_dataparameter. - The plugin’s
addNotifyfunction receives the parameter and constructs an SQL query like:INSERT INTO wp_wpsp_notifications (user_id, message, date) VALUES ($user_id, '$notify_data', NOW()); - Because
$notify_datais not escaped, an attacker can inject SQL commands, e.g.,' OR 1=1; -- -. - The injected SQL can be used to extract data from other tables (e.g.,
wp_users), modify records, or perform other malicious actions.
Root Cause: The use of string concatenation instead of prepared statements (e.g., $wpdb->prepare()) in the WordPress database query.
Vulnerable vs. Patched Code
Vulnerable Code (WPSchoolPress <= 2.2.17):
function addNotify() {
global $wpdb;
$user_id = get_current_user_id();
$notify_data = $_POST['notify_data'];
$wpdb->query("INSERT INTO {$wpdb->prefix}wpsp_notifications (user_id, message, date) VALUES ($user_id, '$notify_data', NOW())");
}
Patched Code (Hypothetical Fix):
function addNotify() {
global $wpdb;
$user_id = get_current_user_id();
$notify_data = sanitize_text_field($_POST['notify_data']);
$wpdb->query(
$wpdb->prepare(
"INSERT INTO {$wpdb->prefix}wpsp_notifications (user_id, message, date) VALUES (%d, %s, NOW())",
$user_id,
$notify_data
)
);
}
The patched version uses $wpdb->prepare() with placeholders (%d for integer, %s for string) to safely escape user input, preventing SQL injection.
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- A WordPress site with WPSchoolPress plugin version <= 2.2.17.
- Valid teacher-level credentials (username and password).
Exploitation Steps:
- Log in as a teacher.
- Craft a POST request to the WordPress AJAX endpoint with the malicious payload.
- Use a tool like
curlor Burp Suite to send the request.
Example Exploit Request:
curl -X POST http://target.com/wp-admin/admin-ajax.php \
-d "action=addNotify¬ify_data=' UNION SELECT user_login, user_pass, user_email FROM wp_users-- -"
Expected Outcome: The injected SQL will extract usernames, password hashes, and email addresses from the wp_users table, which can be used for further attacks (e.g., password cracking).
Note: No public exploit code is available at this time, but the above example demonstrates the injection vector.
Blue Team (Detection & Prevention)
Detection:
- Monitor for unusual AJAX requests to
admin-ajax.phpwithaction=addNotifyand suspicious payloads containing SQL keywords (e.g.,UNION,SELECT,OR 1=1). - Enable WordPress audit logging to track teacher-level actions.
- Use a Web Application Firewall (WAF) to block SQL injection patterns.
Prevention:
- Immediately update the plugin if a patch becomes available.
- If no patch is available, disable the
addNotifyfunctionality by removing or commenting out the relevant code in the plugin files. - Restrict teacher-level access to only trusted users.
- Implement input validation and output escaping for all user-supplied data.
Indicators of Compromise (IOCs)
- Network IOCs:
- POST requests to
/wp-admin/admin-ajax.phpwithaction=addNotifyand parameters containing SQL keywords. - Unusual database queries in MySQL logs (e.g.,
UNION SELECTstatements).
- POST requests to
- File IOCs:
- Modified plugin files (e.g.,
wp-content/plugins/wpschoolpress/). - Suspicious entries in WordPress error logs.
- Modified plugin files (e.g.,
- System IOCs:
- Unexpected database user creation or privilege escalation.
- Unauthorized data exports from the database.
Detection Engineering
YARA Rule
rule CVE_2025_1669_WPSchoolPress_SQLi {
meta:
description = "Detects SQL injection attempts targeting WPSchoolPress addNotify action"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-1669"
strings:
$s1 = "addNotify" ascii wide nocase
$s2 = "UNION" ascii wide nocase
$s3 = "SELECT" ascii wide nocase
$s4 = "OR 1=1" ascii wide nocase
condition:
$s1 and any of ($s2, $s3, $s4)
}
Sigma Rule
title: CVE-2025-1669 WPSchoolPress SQL Injection Detection
id: 8a9b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d
status: experimental
description: Detects SQL injection attempts against WPSchoolPress addNotify action
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
service: access_combined
detection:
selection:
cs-method: 'POST'
cs-uri-query|contains: 'action=addNotify'
cs-uri-query|contains|all:
- 'UNION'
- 'SELECT'
condition: selection
falsepositives:
- Legitimate use of UNION SELECT in rare cases (unlikely)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2025-1669 WPSchoolPress SQL Injection Attempt"; flow:to_server,established; content:"POST"; http_method; content:"/wp-admin/admin-ajax.php"; http_uri; content:"action=addNotify"; http_client_body; pcre:"/(UNION|SELECT|OR\s+1=1)/i"; sid:1000001; rev:1;)
Remediation & Mitigation
- Immediate Action: Disable the WPSchoolPress plugin if it is not critical to operations.
- Short-term Mitigation:
- Implement a Web Application Firewall (WAF) rule to block SQL injection patterns in
addNotifyrequests. - Restrict teacher-level accounts to only those who absolutely need them.
- Monitor logs for suspicious activity.
- Implement a Web Application Firewall (WAF) rule to block SQL injection patterns in
- Long-term Fix:
- Apply the official patch from the vendor once released.
- If no patch is available, manually fix the vulnerable code by replacing string concatenation with
$wpdb->prepare().
- Verification: After applying fixes, test the
addNotifyfunctionality with malicious payloads to ensure they are blocked.
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.
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.