CVE-2026-73858 is a medium-severity (CVSS 5.3) CWE-1336 vulnerability in solspace/craft-freeform. A fix is available for solspace/craft-freeform — see the affected versions and patch details below.
Solspace Freeform: Limited Twig template injection via submitted field values
Exploitation Status
Proof-of-concept exploit code exists
- CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
- CISA assesses this as automatable — exploitation doesn’t require manual, per-target effort, which raises the odds of mass scanning and opportunistic attacks.
Exploitation and automatability from CISA’s SSVC triage for CVE-2026-73858.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
CVE-2026-73858 by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.
Where this sits among everything scored
Of 394,803 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Counts from FIRST.org, log-scaled.
Real-World Exposure
solspace/craft-freeformReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Packagist packages — download data is not available via public APIs for these ecosystems.
Description
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 variables
Proof of Concept
-
Submit a public Freeform form.
-
Inject the following payload into an email field:
{{ constant('PHP_VERSION') }}@example.com
The 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 input
This 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.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐘Packagist | solspace/craft-freeform | ≥ 5.0.0&&< 5.10.14 | 5.10.14composer require solspace/craft-freeform:^5.10.14 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for solspace/craft-freeform, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update solspace/craft-freeform to 5.10.14 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2026-73858 is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
Frequently Asked Questions
Is CVE-2026-73858 in your dependencies?
Find it across Packagist, including transitive dependencies.