CVE-2026-52889: Verbb/formie Formie Hidden Field Defaults Vulnerable Vulnerability
CRITICALCVE-2026-52889 is a CRITICAL (CVSS 9.8) formie hidden field defaults vulnerable vulnerability (CWE-1336: Improper Neutralization of Special Elements Used in a Template Engine) affecting Verbb/formie libraries in the Packagist ecosystem. The issue involves formie hidden field defaults vulnerable to server-side template injection. Remediation is available by upgrading affected packages to version 3.1.27.
CVE-2026-52889 at a Glance
Security Impact
CVSS: 9.8
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:H/I:H/A:H).
How to Fix CVE-2026-52889
To remediate this vulnerability, upgrade all affected Verbb/formie 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 verbb/formie to 3.1.27
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for verbb/formie
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-52889, inspect your project dependencies for Verbb/formie:
inspect dependencies for verbb/formie
Analyze the terminal output to locate any version of Verbb/formie in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.1.27), 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 Verbb/formie, 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-52889 Affected Verbb/formie Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
verbb/formie
|
Packagist |
< 3.1.27
|
3.1.27
|
References
Frequently Asked Questions
What is CVE-2026-52889?
Which Verbb/formie versions are affected?
What version fixes CVE-2026-52889?
Is verbb/formie affected?
What is the CVSS score of CVE-2026-52889?
What CWE is associated with CVE-2026-52889?
How can I check Packagist dependencies for CVE-2026-52889?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-565m-g33j-jq96",
"modified" : "2026-07-06T16:52:16Z",
"published" : "2026-07-06T16:52:16Z",
"aliases" : [ "CVE-2026-52889" ],
"summary" : "Formie Hidden field defaults vulnerable to Server-Side Template Injection",
"details" : "## Summary\nFormie Hidden fields could evaluate request-derived values as Twig during front-end form rendering.\n\nWhen a Hidden field used a dynamic default value such as HTTP User Agent, Referer URL, Current URL, Query Parameter, or Cookie Value, the value was copied from the incoming request and later passed to Craft’s Twig rendering layer. This allowed an unauthenticated attacker to provide Twig syntax in request-controlled input and have it evaluated server-side when the form was rendered.\n\n## Affected Versions\n`verbb/formie` for Craft 5:\n- Affected: >= 3.0.0-beta.1, <= 3.1.26\n- Patched: 3.1.27\n\n## Impact\nAn unauthenticated attacker could trigger server-side template evaluation by visiting a public form containing a Hidden field configured with a request-derived default value.\n\nBecause Craft’s normal Twig environment exposes application objects, this may lead to disclosure of sensitive information, modification of application state, or remote code execution depending on the site configuration and available Twig capabilities.\n\n## Technical Details\nThe issue exists in the Hidden field front-end render path. Request-derived Hidden field defaults were assigned to the field’s defaultValue, then rendered via Twig in `Hidden::getFrontEndInputOptions()`.\n\nThe fix ensures Twig rendering is only performed for the custom default option, where the template source is admin-authored. Request-derived default options are now treated as plain strings.\n\n## Patches\nUpdate to Formie 3.1.27 or later.\n\n## Workarounds\nUntil patched, avoid using request-derived Hidden field defaults on public forms, including:\n- HTTP User Agent\n- HTTP Refer URL\n- Current URL\n- Current URL without Query String\n- Query Parameter\n- Cookie Value\n\nAlternatively, remove affected Hidden fields from public forms until the update is applied.\n\n## Credit\nName: Yanchon918s\nEmail: [ao9s@ao9s.net](mailto:ao9s@ao9s.net)",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "verbb/formie"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.1.27"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/verbb/formie/security/advisories/GHSA-565m-g33j-jq96"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/verbb/formie"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-1336" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2026-07-06T16:52:16Z",
"nvd_published_at" : null
}
}