CVE-2024-2297·PHP vulnerability
The Bricks theme for WordPress is vulnerable to Privilege Escalation in all versions up to, and including, 1.9.6.1. This is due to insufficient validation checks placed on the create_autosave AJAX function. This makes it possible for authenticated attackers, with contributor-level access and above, to execute arbitrary PHP code with elevated (administrator-level) privileges. NOTE: Successful exploitation requires (1) the Bricks Builder to be enabled for posts (2) Builder access to be enabled for contributor-level users, and (3) "Code Execution" to be enabled for administrator-level users within the theme's settings.
- Severity
- high
- Software
- PHP
- Fixed in
- 1.9.7
- Published
- 2025-02-27
Affected versions
Until: 1.9.7
Fixed in: 1.9.7
How to fix this CVE
Update the Bricks theme for WordPress to version 1.9.7 or later to patch the privilege escalation vulnerability in the create_autosave AJAX function. This vulnerability allows authenticated contributors to execute arbitrary PHP code with administrator privileges when specific theme settings are enabled. Verify that your WordPress installation has the patched version deployed and test that the Builder functionality operates normally after the update.
sudo dnf update phpDefensia detects this vulnerability
What an exploitation attempt looks like
Sample log line indicative of exploitation attempts:
POST /wp-admin/admin-ajax.php HTTP/1.1.*action=create_autosave.*post_data.*<?php|eval\(|system\(|exec\(|passthru\(WAF mitigation (if patching is not yet possible)
Add this rule to your WAF to block exploitation attempts while you schedule the patch.
Block or rate-limit POST requests to /wp-admin/admin-ajax.php with action=create_autosave parameter from non-administrator user roles. Additionally, implement strict Content-Security-Policy headers to prevent inline PHP execution and monitor for suspicious code patterns in POST body payloads.How to check if you are affected
- Step 1: Check the Bricks theme version by running: grep -r "Version:" /path/to/wordpress/wp-content/themes/bricks/style.css | head -1
- Step 2: Verify if Bricks Builder is enabled for posts by checking the WordPress admin panel under Bricks > Settings and confirming 'Code Execution' is restricted to administrators only
- Step 3: Search WordPress logs and web server logs for AJAX requests to /wp-admin/admin-ajax.php containing 'action=create_autosave' from non-administrator user IDs: grep -r 'create_autosave' /var/log/apache2/access.log | grep -v 'user_id=1'
- Step 4: Verify the patch by checking the Bricks theme version again and confirming it is 1.9.7 or higher
Indicators of compromise
- POST request to /wp-admin/admin-ajax.php with action=create_autosave from user_id other than administrator
- create_autosave AJAX requests containing PHP code tags or function calls (eval, system, exec, passthru)
- Bricks theme version string matching: bricks/[0-1]\.[0-9]+\.[0-6](\.[0-9]+)? in server response headers or theme files
FAQ
What is CVE-2024-2297?
CVE-2024-2297 is a privilege escalation vulnerability in the Bricks WordPress theme that allows authenticated users with contributor-level access to bypass authorization checks in the create_autosave AJAX handler and execute arbitrary PHP code with administrator privileges.
Is CVE-2024-2297 being actively exploited?
No, CVE-2024-2297 is not currently listed in CISA's Known Exploited Vulnerabilities catalog, and no public exploits have been disclosed as of this advisory.
What versions of the Bricks theme are affected by CVE-2024-2297?
All versions of the Bricks theme up to and including version 1.9.6.1 are vulnerable; the fix is available in version 1.9.7 and later.
How do I check if my WordPress site is vulnerable to CVE-2024-2297?
Run: grep 'Version:' /path/to/wordpress/wp-content/themes/bricks/style.css to check your installed version. If it is 1.9.6.1 or earlier AND the Bricks Builder is enabled for posts with contributor access, your site is potentially vulnerable.
Does Defensia detect CVE-2024-2297?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If the Bricks theme is installed on a monitored WordPress server, CVE-2024-2297 will appear in your dashboard with remediation steps.
Related PHP CVEs
References
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2024-2297. Free for 1 server.
Get started free