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
- Check if the plugin is installed: wp plugin list --path=/var/www/html | grep contact-form-by-supsystic
- Check version: wp plugin get contact-form-by-supsystic --path=/var/www/html --field=version — vulnerable if <= 1.7.36
- Search access logs for SSTI attempts: grep 'ssc_contact_form_submit' /var/log/apache2/access.log
- Search POST bodies for template syntax: grep -r '{{' /var/log/apache2/ | grep supsystic
- 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
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