critical CVSS 9.8

CVE-2024-6164·PHP vulnerability

The Filter & Grids WordPress plugin before 2.8.33 is vulnerable to Local File Inclusion via the post_layout parameter. This makes it possible for an unauthenticated attacker to include and execute PHP files on the server, allowing the execution of any PHP code in those files.

Severity
critical
Software
PHP
Fixed in
2.8.33
Published
2024-07-18

Affected versions

Until: 2.8.33

Fixed in: 2.8.33

How to fix this CVE

Update the Filter & Grids WordPress plugin to version 2.8.33 or later to patch the local file inclusion vulnerability in the post_layout parameter. This vulnerability allows unauthenticated attackers to read and execute arbitrary PHP files on your server. Immediately apply this update to prevent remote code execution attacks.

sudo dnf update php

Defensia detects this vulnerability

What an exploitation attempt looks like

Sample log line indicative of exploitation attempts:

POST|GET request containing 'post_layout' parameter with path traversal sequences such as: post_layout=../../../../etc/passwd, post_layout=../../../wp-config.php, or post_layout parameter followed by PHP wrapper syntax (php://, data://, or phar://)

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 sanitize requests to the vulnerable plugin endpoints containing the post_layout parameter with path traversal characters (../, ..\, etc/) or PHP stream wrappers. Implement input validation rules that reject any post_layout values containing directory traversal sequences or null bytes. Rate-limit requests to the affected plugin to slow reconnaissance attempts.

How to check if you are affected

  1. Step 1: Check the installed version of PHP by running: php -v
  2. Step 2: Verify the Filter & Grids WordPress plugin version by checking the plugin header in wp-content/plugins/filter-grids/filter-grids.php or via wp cli: wp plugin list --field=name,version | grep filter-grids
  3. Step 3: Search web server access logs for suspicious post_layout parameter usage: grep -i 'post_layout' /var/log/apache2/access.log /var/log/nginx/access.log | grep -E '\.\.|\.php|etc/passwd'
  4. Step 4: After updating, verify the fix by checking the plugin version again: wp plugin list | grep filter-grids and confirm it shows version 2.8.33 or higher

Indicators of compromise

  • HTTP requests with post_layout parameter containing ../ or ..\
  • POST/GET requests matching pattern: /wp-content/plugins/filter-grids/.*post_layout=.*\.\./

FAQ

What is CVE-2024-6164?

CVE-2024-6164 is a local file inclusion (LFI) vulnerability in the Filter & Grids WordPress plugin that allows unauthenticated attackers to manipulate the post_layout parameter to include and execute arbitrary PHP files stored on the server, leading to remote code execution.

Is CVE-2024-6164 being actively exploited?

According to CISA vulnerability data, CVE-2024-6164 is not currently listed in the Known Exploited Vulnerabilities catalog, and no public exploits are available. However, the critical severity (CVSS 9.8) and ease of exploitation warrant immediate patching.

What versions of the Filter & Grids plugin are affected by CVE-2024-6164?

All versions of the Filter & Grids WordPress plugin before version 2.8.33 are vulnerable. The exact earliest affected version is unknown, but all installations running versions prior to 2.8.33 should be updated immediately.

How do I check if my WordPress site is vulnerable to CVE-2024-6164?

Run the WordPress CLI command: wp plugin list | grep filter-grids to display the installed version. If the version is below 2.8.33, your site is vulnerable. Additionally, check the plugin file at wp-content/plugins/filter-grids/filter-grids.php for the Version header.

Does Defensia detect CVE-2024-6164?

Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If the Filter & Grids WordPress plugin is detected on a monitored server, CVE-2024-6164 will appear in your dashboard with remediation steps and version tracking.

Related PHP CVEs

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-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-2026-39337CVSS 10ChurchCRM is an open-source church management system. Prior to 7.1.0, critical 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 "$dbPassword" variable is not sanitized. This vulnerability exists due to an incomplete fix for CVE-2025-62521. This vulnerability is fixed in 7.1.0.
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.
CVE-2024-5932CVSS 10The GiveWP – Donation Plugin and Fundraising Platform plugin for WordPress is vulnerable to PHP Object Injection in all versions up to, and including, 3.14.1 via deserialization of untrusted input from the 'give_title' parameter. This makes it possible for unauthenticated attackers to inject a PHP Object. The additional presence of a POP chain allows attackers to execute code remotely, and to delete arbitrary files.

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-6164. Free for 1 server.

Get started free