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 phpDefensia 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
- Step 1: Check the installed version of PHP by running: php -v
- 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
- 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'
- 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
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