CVE-2026-73858: Solspace Freeform Limited Twig Template Injection Vulnerability
MODERATECVE-2026-73858 is a MODERATE (CVSS 5.3) limited twig template injection vulnerability (CWE-1336: Improper Neutralization of Special Elements Used in a Template Engine) affecting Solspace Freeform libraries in the Packagist ecosystem. The issue involves limited twig template injection via submitted field values. Remediation is available by upgrading affected packages to version 5.10.14.
CVE-2026-73858 at a Glance
Security Impact
CVSS: 5.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N).
How to Fix CVE-2026-73858
To remediate this vulnerability, upgrade all affected Solspace Freeform dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade solspace/craft-freeform to 5.10.14
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for solspace/craft-freeform
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-73858, inspect your project dependencies for Solspace Freeform:
inspect dependencies for solspace/craft-freeform
Analyze the terminal output to locate any version of Solspace Freeform in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 5.10.14), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-1336: Improper Neutralization of Special Elements Used in a Template Engine, where the product uses a template engine to insert or process externally-influenced input, but it does not neutralize or incorrectly neutralizes special elements or syntax that can be interpreted as template expressions or other code directives when processed by the engine. In Solspace Freeform, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-73858 Affected Solspace Freeform Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
solspace/craft-freeform
|
Packagist |
≥ 5.0.0
< 5.10.14
|
5.10.14
|
References
Frequently Asked Questions
What is CVE-2026-73858?
Which Solspace Freeform versions are affected?
What version fixes CVE-2026-73858?
Is solspace/craft-freeform affected?
What is the CVSS score of CVE-2026-73858?
What CWE is associated with CVE-2026-73858?
How can I check Packagist dependencies for CVE-2026-73858?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-gxrg-x694-283w",
"modified" : "2026-09-23T14:31:10Z",
"published" : "2026-09-23T14:31:10Z",
"aliases" : [ "CVE-2026-73858" ],
"summary" : "Solspace Freeform: Limited Twig template injection via submitted field values",
"details" : "### Summary\n\nA 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.\n\nUnauthenticated 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.\n\nNo 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.\n\n### Details\n\n**Plugin:** Solspace Freeform\n**Affected versions:** Freeform 5.0.0 through 5.10.13\n**CMS:** Craft CMS\n**Authentication required:** None\n**Attack vector:** Public Freeform form submission\n\nSubmitted 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.\n\nThe 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:\n\n```twig\n{{ constant('PHP_VERSION') }}\n{{ constant('PHP_OS') }}\n{{ constant('CRAFT_BASE_PATH') }}\n{{ constant('CRAFT_VENDOR_PATH') }}\n```\n\nTesting did not confirm access to:\n\n```text\ncraft\ncraft.app\nalias()\ngetenv()\ndatabase credentials\nmailer credentials\nCraft security key\nCraft license key\nenvironment variables\n```\n\n### Proof of Concept\n\n1. Submit a public Freeform form.\n\n2. Inject the following payload into an email field:\n\n```twig\n{{ constant('PHP_VERSION') }}@example.com\n```\n\nThe response may reflect the evaluated PHP version, for example:\n\n```html\nvalue=\"8.2.27@example.com\"\n```\n\n3. Inject the following payload into a text field:\n\n```twig\n{{ constant('CRAFT_VENDOR_PATH') }}\n```\n\nThe response may reflect the absolute vendor path, for example:\n\n```text\n/var/www/example-site/production/vendor/\n```\n\n### Impact\n\nAn unauthenticated attacker with access to a public Freeform form could cause limited Twig expressions to be evaluated server-side.\n\nConfirmed impact includes:\n\n```text\nPHP version disclosure\nOperating system/platform disclosure\nAbsolute filesystem path disclosure\nPotential form rendering errors from malformed Twig input\n```\n\nThis 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.\n\n### Remediation\n\nFreeform 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.\n\nThis issue has been resolved by preventing submitted field values from being rendered as Twig in the affected context.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "solspace/craft-freeform"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "5.0.0"
}, {
"fixed" : "5.10.14"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 5.10.13"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/solspace/craft-freeform/security/advisories/GHSA-gxrg-x694-283w"
}, {
"type" : "WEB",
"url" : "https://github.com/solspace/craft-freeform/pull/1986"
}, {
"type" : "WEB",
"url" : "https://github.com/solspace/craft-freeform/commit/5f7555320635f1cd3b4c478aa0b58e8c3144313b"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/solspace/craft-freeform"
}, {
"type" : "WEB",
"url" : "https://github.com/solspace/craft-freeform/releases/tag/v5.10.14"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-1336" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-09-23T14:31:10Z",
"nvd_published_at" : null
}
}