CVE-2026-73858: Solspace Freeform: Limited Twig template injection via submitted field values
Summary A limited server-side Twig template injection issue was identified in Solspace Freeform for Craft CMS. In affected versions, submitted form field values could be evaluated as Twig in certain rendering contexts. Unauthenticated users could submit Twig expressions through public Freeform forms and have those expressions evaluated when the submitted values were rendered back into the form response.
Published Sep 23, 2026
Affected packages
solspace/craft-freeform
- Ecosystem
- Composer (PHP)
- Affected
- >= 5.0.0, <= 5.10.13
- Fixed in
- 5.10.14
- Check
composer show solspace/craft-freeform
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
Summary
A limited server-side Twig template injection issue was identified in Solspace Freeform for Craft CMS. In affected versions, submitted form field values could be evaluated as Twig in certain rendering contexts.
Unauthenticated users could submit Twig expressions through public Freeform forms and have those expressions evaluated when the submitted values were rendered back into the form response. Confirmed impact includes disclosure of limited server/environment information, such as the PHP version and absolute filesystem paths.
No evidence was found that this issue allowed access to Craft globals, environment variables, database credentials, mailer credentials, security keys, or remote code execution in the tested environment.
Details
Plugin: Solspace Freeform Affected versions: Freeform 5.0.0 through 5.10.13 CMS: Craft CMS Authentication required: None Attack vector: Public Freeform form submission
Submitted field values were passed through Freeform’s isolated Twig renderer. As a result, Twig expressions included in submitted values could be evaluated server-side and reflected in the HTTP response.
The isolated Twig context appears to limit the available functions and globals. Confirmed accessible values were limited to PHP/core constants and Craft bootstrap constants such as:
{{ constant('PHP_VERSION') }}
{{ constant('PHP_OS') }}
{{ constant('CRAFT_BASE_PATH') }}
{{ constant('CRAFT_VENDOR_PATH') }}Testing did not confirm access to:
craft
craft.app
alias()
getenv()
database credentials
mailer credentials
Craft security key
Craft license key
environment variablesProof of Concept
- Submit a public Freeform form.
- Inject the following payload into an email field:
{{ constant('PHP_VERSION') }}@example.comThe response may reflect the evaluated PHP version, for example:
value="[email protected]"- Inject the following payload into a text field:
{{ constant('CRAFT_VENDOR_PATH') }}The response may reflect the absolute vendor path, for example:
/var/www/example-site/production/vendor/Impact
An unauthenticated attacker with access to a public Freeform form could cause limited Twig expressions to be evaluated server-side.
Confirmed impact includes:
PHP version disclosure
Operating system/platform disclosure
Absolute filesystem path disclosure
Potential form rendering errors from malformed Twig inputThis could assist with environment fingerprinting or be used in combination with other vulnerabilities. However, no credential disclosure, Craft application access, arbitrary file read, or remote code execution was confirmed.
Remediation
Freeform should treat submitted field values as plain user input and should not evaluate them as Twig. Twig rendering should be limited to trusted/admin-authored templates and configuration values.
This issue has been resolved by preventing submitted field values from being rendered as Twig in the affected context.
Credited to wakedxy.
References
- https://github.com/solspace/craft-freeform/security/advisories/GHSA-gxrg-x694-283w
- https://github.com/solspace/craft-freeform/pull/1986
- https://github.com/solspace/craft-freeform/commit/5f7555320635f1cd3b4c478aa0b58e8c3144313b
- https://github.com/solspace/craft-freeform/releases/tag/v5.10.14
- https://github.com/advisories/GHSA-gxrg-x694-283w
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More Composer (PHP) vulnerabilities
All Composer (PHP) entriesCVE-2026-26188
Freeform Craft Plugin CP UI (builder/integrations) has Stored Cross-Site Scripting (XSS) issue
low2.1Jan 22, 2026GHSA-44jg-mv3h-wj6g
solspace/craft-freeform Vulnerable to XSS in `PhpSpreadsheet` HTML Writer Due to Unsanitized Styling Data
low1.9Jan 15, 2026GHSA-58q2-9x27-h2jm
solspace/craft-freeform Has a DoS Vulnerability
low2.7Jan 15, 2026GHSA-rwr8-xrpw-9qf5
solspace/craft-freeform Exposed to Known Axios Vulnerabilities via Precompiled Assets
lowJan 15, 2026CVE-2025-52122
The Freeform CraftCMS plugin contains an Server-side template injection (SSTI) vulnerability
critical9.8Aug 27, 2025
