critical CVSS 9.8 Public exploit available

CVE-2026-4257·PHP vulnerability

The Contact Form by Supsystic plugin for WordPress is vulnerable to Server-Side Template Injection (SSTI) leading to Remote Code Execution (RCE) in all versions up to, and including, 1.7.36. This is due to the plugin using the Twig `Twig_Loader_String` template engine without sandboxing, combined with the `cfsPreFill` prefill functionality that allows unauthenticated users to inject arbitrary Twig expressions into form field values via GET parameters. This makes it possible for unauthenticated attackers to execute arbitrary PHP functions and OS commands on the server by leveraging Twig's `registerUndefinedFilterCallback()` method to register arbitrary PHP callbacks.

Severity
critical
Software
PHP
Published
2026-03-30

How to fix this CVE

Update the Contact Form by Supsystic plugin to version 1.7.37 or later, or deactivate and remove it. Replace with a well-maintained alternative (Contact Form 7, WPForms, Gravity Forms). Audit for signs of compromise.

# Update the plugin:
wp plugin update contact-form-by-supsystic --path=/var/www/html
# Or remove it:
wp plugin deactivate contact-form-by-supsystic --path=/var/www/html
wp plugin delete contact-form-by-supsystic --path=/var/www/html
# Scan for compromise:
find /var/www -name '*.php' -newer /var/log/syslog -mtime -7 -exec grep -l 'eval\|system\|exec' {} \;

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=ssc_contact_form_submit&form_data={{constructor.constructor('return process')().mainModule.require('child_process').execSync('id')}}

The attacker submits a form with template injection payloads in form fields. The plugin's template engine evaluates the injected code, executing arbitrary system commands.

WAF mitigation (if patching is not yet possible)

Add this rule to your WAF to block exploitation attempts while you schedule the patch.

SecRule ARGS "@rx \{\{.*(?:constructor|process|require|exec|system|spawn).*\}\}" "id:20264257,phase:2,deny,status:403,msg:'CVE-2026-4257 SSTI attempt via Supsystic Contact Form',severity:CRITICAL"

SecRule ARGS:action "@streq ssc_contact_form_submit" "id:20264258,phase:2,chain"
SecRule ARGS "@rx \{\{" "deny,status:403,msg:'Template injection in contact form'"

How to check if you are affected

  1. Check if the plugin is installed: wp plugin list --path=/var/www/html | grep contact-form-by-supsystic
  2. Check version: wp plugin get contact-form-by-supsystic --path=/var/www/html --field=version — vulnerable if <= 1.7.36
  3. Search access logs for SSTI attempts: grep 'ssc_contact_form_submit' /var/log/apache2/access.log
  4. Search POST bodies for template syntax: grep -r '{{' /var/log/apache2/ | grep supsystic
  5. Scan for dropped web shells: find /var/www -name '*.php' -mtime -7 -exec grep -l 'eval\|base64_decode' {} \;

Indicators of compromise

  • POST requests to admin-ajax.php with action=ssc_contact_form_submit containing {{ or {% sequences
  • Template engine error messages in WordPress debug logs
  • New PHP files created by the web server user in wp-content/
  • Unexpected outbound connections from the web server process
  • Modified .htaccess or wp-config.php files

FAQ

How popular is the Contact Form by Supsystic plugin?

It has over 30,000 active installations according to the WordPress plugin directory. While not as popular as Contact Form 7, it has a significant user base.

What is Server-Side Template Injection (SSTI)?

SSTI occurs when user input is embedded into a server-side template engine and evaluated as template code rather than plain text. This allows attackers to execute arbitrary code by injecting template syntax like {{...}} that the engine interprets and executes.

Can this be exploited without authentication?

Yes. Contact forms are designed to accept input from anonymous visitors. The SSTI payload is submitted as form field content, requiring no WordPress authentication.

Are other Supsystic plugins affected?

This CVE specifically affects the Contact Form by Supsystic plugin. Other Supsystic plugins may have different vulnerabilities but are not covered by this CVE.

Should I switch to a different contact form plugin?

Consider well-maintained alternatives with stronger security track records: Contact Form 7, WPForms, or Gravity Forms. If staying with Supsystic, ensure you update to the patched version and monitor for future vulnerabilities.

Related PHP CVEs

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

Get started free