CVE-2024-4157·PHP vulnerability
The Contact Form Plugin by Fluent Forms for Quiz, Survey, and Drag & Drop WP Form Builder plugin for WordPress is vulnerable to PHP Object Injection in all versions up to, and including, 5.1.15 via deserialization of untrusted input in the extractDynamicValues function. This makes it possible for authenticated attackers, with contributor-level access and above, to inject a PHP Object. If a POP chain is present via an additional plugin or theme installed on the target system, it could allow the attacker to delete arbitrary files, retrieve sensitive data, or execute code. Successful exploitation requires the attacker to have "View Form" and "Manage Form" permissions, which must be explicitly set by an administrator. However, this requirement can be bypassed when this vulnerability is chained with CVE-2024-2771.
- Severity
- high
- Software
- PHP
- Fixed in
- 5.1.16
- Published
- 2024-05-22
Affected versions
Until: 5.1.16
Fixed in: 5.1.16
How to fix this CVE
Upgrade the Fluent Forms plugin to version 5.1.16 or later to patch the PHP Object Injection vulnerability in the extractDynamicValues function. Organizations running affected versions should prioritize this update, especially if contributor-level users or above have form management permissions. Review user access controls to ensure only trusted administrators can manage forms and view form data.
sudo dnf update phpDefensia detects this vulnerability
What an exploitation attempt looks like
Sample log line indicative of exploitation attempts:
POST requests to WordPress form submission endpoints containing PHP serialized object syntax (e.g., O:\d+:\"[a-zA-Z0-9_]+\") in parameters passed to extractDynamicValues function; look for patterns like 'O:' followed by digit counts in form data payloadsWAF mitigation (if patching is not yet possible)
Add this rule to your WAF to block exploitation attempts while you schedule the patch.
Implement WAF rules to block HTTP POST requests containing PHP serialized object prefixes (^O:\d+:|^a:\d+:|^r:\d+:) in form parameters and request bodies targeting form submission endpoints. Use negative lookahead on trusted internal submission IPs and rate-limit contributor-level form access attempts.How to check if you are affected
- Verify the installed PHP version by running: php -v
- Check the Fluent Forms plugin version in WordPress admin panel under Plugins > Installed Plugins, or via SSH: grep -i 'Version:' /path/to/wp-content/plugins/fluentform/fluentform.php | head -1
- Search web server access logs for POST requests to form endpoints containing serialized PHP objects (patterns like O:\d+:\"): grep -E 'extractDynamicValues|O:[0-9]+:' /var/log/apache2/access.log /var/log/nginx/access.log
- Confirm the patch by verifying the plugin version is 5.1.16 or later and checking the changelog: https://plugins.trac.wordpress.org/changeset/3081740/fluentform
FAQ
What is CVE-2024-4157?
CVE-2024-4157 is a PHP Object Injection vulnerability in the Fluent Forms WordPress plugin that allows authenticated users with contributor-level permissions to inject malicious serialized objects. If a gadget chain exists in another installed plugin or theme, attackers could execute arbitrary code, delete files, or exfiltrate sensitive data.
Is CVE-2024-4157 being actively exploited?
No, CVE-2024-4157 is not currently listed on the CISA KEV catalog and no public exploits are available. However, the vulnerability poses significant risk in multi-plugin environments where POP chains may exist.
What versions of Fluent Forms are affected by CVE-2024-4157?
All versions of the Fluent Forms plugin up to and including version 5.1.15 are vulnerable. Version 5.1.16 and later contain the fix.
How do I check if my WordPress site is vulnerable to CVE-2024-4157?
Log into your WordPress admin panel, navigate to Plugins > Installed Plugins, and locate 'Fluent Forms'. If the version displayed is 5.1.15 or earlier, your site is vulnerable. You can also run: grep 'Version:' /path/to/wp-content/plugins/fluentform/fluentform.php
Does Defensia detect CVE-2024-4157?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If Fluent Forms is installed on a monitored WordPress server, CVE-2024-4157 will appear in your dashboard with remediation steps and version mismatch alerts.
Related PHP CVEs
References
- https://plugins.trac.wordpress.org/changeset/3081740/fluentform
- https://www.wordfence.com/threat-intel/vulnerabilities/id/8def156a-f2f2-4640-a1c9-c21c74e1f308?source=cve
- https://plugins.trac.wordpress.org/changeset/3081740/fluentform
- https://www.wordfence.com/threat-intel/vulnerabilities/id/8def156a-f2f2-4640-a1c9-c21c74e1f308?source=cve
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2024-4157. Free for 1 server.
Get started free