high CVSS 7.5

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 php

Defensia 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 payloads

WAF 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

  1. Verify the installed PHP version by running: php -v
  2. 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
  3. 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
  4. 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

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-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.
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-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-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.

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

Get started free