CVE-2024-56246
Executive Summary
CVE-2024-56246 is a DOM-Based Cross-Site Scripting (XSS) vulnerability in the WordPress plugin Nexter Blocks (also known as the-plus-addons-for-block-editor) by POSIMYTH. This vulnerability affects all versions up to and including 4.0.4. An attacker can inject malicious scripts into web pages generated by the plugin, which execute in the victim's browser due to improper neutralization of user input. The vulnerability is classified as DOM-Based XSS, meaning the payload is executed client-side without server-side reflection. The CVSS score is 6.5 (Medium), and the EPSS probability is 0.0%, indicating low exploitation likelihood at this time. No public proof-of-concept or patch details are available.
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. Users who installed the plugin via the WordPress admin dashboard or directly from the repository are at risk. The plugin is not available on NPM, PyPI, Go, or Ruby ecosystems.
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: Network (AV:N)
- Attack Complexity: Low (AC:L)
- Privileges Required: None (PR:N)
- User Interaction: Required (UI:R) – victim must click a crafted link or visit a malicious page.
- Scope: Changed (S:C) – the vulnerability can affect resources beyond the vulnerable component.
- Confidentiality Impact: Low (C:L)
- Integrity Impact: Low (I:L)
- Availability Impact: Low (A:L)
Threat Level: Medium. Exploitation requires user interaction, but the impact is limited to low-level data exposure and script execution.
Deep Dive & Mechanics
The vulnerability resides in the Nexter Blocks plugin, which provides custom Gutenberg blocks for the WordPress block editor. The plugin fails to properly sanitize user-supplied input before inserting it into the DOM via JavaScript. This allows an attacker to craft a malicious URL or input that, when processed by the plugin's JavaScript, executes arbitrary HTML/JavaScript in the context of the victim's browser.
Root Cause: The plugin uses innerHTML or similar DOM manipulation methods without escaping or sanitizing user-controlled data. For example, a block attribute like data-custom might be directly injected into the DOM.
Attack Vector: An attacker can craft a link containing a malicious payload in a query parameter or fragment identifier. When a logged-in administrator or editor visits the link, the plugin's JavaScript reads the parameter and injects it into the page, executing the payload.
Example (Conceptual):
// Vulnerable code in plugin's JS
var userInput = getParameterByName('custom');
document.getElementById('nexter-block').innerHTML = userInput;
Vulnerable vs. Patched Code
Vulnerable Code (<= 4.0.4):
// Example of vulnerable JavaScript in plugin
function renderBlock(attributes) {
var block = document.createElement('div');
block.innerHTML = attributes.customContent; // No sanitization
document.body.appendChild(block);
}
Patched Code (Hypothetical):
// Patched version with proper sanitization
function renderBlock(attributes) {
var block = document.createElement('div');
block.textContent = attributes.customContent; // Safe assignment
// Or use DOMPurify
block.innerHTML = DOMPurify.sanitize(attributes.customContent);
document.body.appendChild(block);
}
Exploitation & Lab Setup
Red Team (Attack Simulation)
- Setup: Install WordPress with Nexter Blocks plugin version 4.0.4.
- Craft Payload: Create a URL with a malicious fragment:
http://target-site.com/?custom=<img src=x onerror=alert('XSS')> - Deliver: Send the link to a logged-in admin via email or social engineering.
- Execute: When the admin clicks the link, the plugin's JavaScript reads the
customparameter and injects the payload into the DOM, triggering the XSS.
Note: No public exploit code is available. This is a conceptual example.
Blue Team (Detection & Defense)
- Monitor: Look for unusual query parameters or fragment identifiers in web requests.
- WAF Rules: Block requests containing
<script>oronerrorin query parameters. - User Training: Educate users about phishing links and suspicious URLs.
- Update: Apply patches when available.
Indicators of Compromise (IOCs)
- Network: HTTP requests with suspicious query parameters like
?custom=<script>alert(1)</script>. - Host: JavaScript files from the plugin directory (
/wp-content/plugins/the-plus-addons-for-block-editor/) that containinnerHTMLassignments without sanitization. - Logs: Web server logs showing requests with
%3Cscript%3E(URL-encoded<script>).
Detection Engineering
YARA Rule
rule CVE_2024_56246_DOM_XSS {
meta:
description = "Detects vulnerable Nexter Blocks plugin JavaScript files"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2024-56246"
strings:
$vuln1 = ".innerHTML = " ascii wide nocase
$vuln2 = "getParameterByName" ascii wide nocase
$plugin = "the-plus-addons-for-block-editor" ascii wide nocase
condition:
$plugin and ($vuln1 or $vuln2)
}
Sigma Rule
title: CVE-2024-56246 DOM XSS in Nexter Blocks
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects potential exploitation of DOM XSS in Nexter Blocks plugin
author: Valters IT
logsource:
category: webserver
product: apache
service: access_combined
detection:
selection:
cs-uri-query|contains:
- '<script'
- 'onerror='
- 'onload='
- 'alert('
condition: selection
falsepositives:
- Legitimate use of similar patterns in other plugins
level: medium
Suricata Rule
alert http any any -> any any (msg:"CVE-2024-56246 DOM XSS in Nexter Blocks"; flow:to_server,established; content:"/wp-content/plugins/the-plus-addons-for-block-editor/"; http_uri; content:"<script"; http_uri; nocase; sid:1000001; rev:1;)
Remediation & Mitigation
- Immediate: Disable the Nexter Blocks plugin until a patch is available.
- Short-term: Implement a Web Application Firewall (WAF) rule to block malicious query parameters.
- Long-term: Update to a patched version when released by POSIMYTH.
- Code Fix: The plugin developer should sanitize all user inputs using
textContentor a library like DOMPurify before DOM insertion.
Valters IT Securing digital frontiers, one CVE at a time.
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.