high CVSS 7.1

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 php

Defensia 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

  1. Step 1: Check the Bricks theme version by running: grep -r "Version:" /path/to/wordpress/wp-content/themes/bricks/style.css | head -1
  2. 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
  3. 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'
  4. 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

CVE-2026-28289CVSS 10FreeScout is a free help desk and shared inbox built with PHP's Laravel framework. A patch bypass vulnerability for CVE-2026-27636 in FreeScout 1.8.206 and earlier allows any authenticated user with file upload permissions to achieve Remote Code Execution (RCE) on the server by uploading a malicious .htaccess file using a zero-width space character prefix to bypass the security check. The vulnerability exists in the sanitizeUploadedFileName() function in app/Http/Helper.php. The function contains a Time-of-Check to Time-of-Use (TOCTOU) flaw where the dot-prefix check occurs before sanitization removes invisible characters. This vulnerability is fixed in 1.8.207.
CVE-2025-46348CVSS 10YesWiki is a wiki system written in PHP. Prior to version 4.5.4, the request to commence a site backup can be performed and downloaded without authentication. The archives are created with a predictable filename, so a malicious user could create and download an archive without being authenticated. This could result in a malicious attacker making numerous requests to create archives and fill up the file system, or by downloading the archive which contains sensitive site information. This issue has been patched in version 4.5.4.
CVE-2025-47916CVSS 10Invision Community 5.0.0 before 5.0.7 allows remote code execution via crafted template strings to themeeditor.php. The issue lies within the themeeditor controller (file: /applications/core/modules/front/system/themeeditor.php), where a protected method named customCss can be invoked by unauthenticated users. This method passes the value of the content parameter to the Theme::makeProcessFunction() method; hence it is evaluated by the template engine. Accordingly, this can be exploited by unauthenticated attackers to inject and execute arbitrary PHP code by providing crafted template strings.
CVE-2025-25174CVSS 10Improper Control of Filename for Include/Require Statement in PHP Program ('PHP Remote File Inclusion') vulnerability in beeteam368 BeeTeam368 Extensions beeteam368-extensions allows PHP Local File Inclusion.This issue affects BeeTeam368 Extensions: from n/a through <= 1.9.4.
CVE-2025-62521CVSS 10ChurchCRM is an open-source church management system. Prior to version 5.21.0, a pre-authentication remote code execution vulnerability in ChurchCRM's setup wizard allows unauthenticated attackers to inject arbitrary PHP code during the initial installation process, leading to complete server compromise. The vulnerability exists in `setup/routes/setup.php` where user input from the setup form is directly concatenated into a PHP configuration template without any validation or sanitization. Any parameter in the setup form can be used to inject PHP code that gets written to `Include/Config.php`, which is then executed on every page load. This is more severe than typical authenticated RCE vulnerabilities because it requires no credentials and affects the installation process that administrators must complete. Version 5.21.0 patches the issue.

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