CVE-2026-52889

CVE-2026-52889 is a critical-severity security vulnerability in verbb/formie (composer), affecting versions < 3.1.27. It is fixed in 3.1.27.

Summary

Formie Hidden field defaults vulnerable to Server-Side Template Injection

Full technical description

Formie Hidden fields could evaluate request-derived values as Twig during front-end form rendering.

When 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.

Affected Versions

verbb/formie for Craft 5:

  • Affected: >= 3.0.0-beta.1, <= 3.1.26
  • Patched: 3.1.27

Technical Details

The 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().

The 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.

Workarounds

Until patched, avoid using request-derived Hidden field defaults on public forms, including:

  • HTTP User Agent
  • HTTP Refer URL
  • Current URL
  • Current URL without Query String
  • Query Parameter
  • Cookie Value

Alternatively, remove affected Hidden fields from public forms until the update is applied.

Credit

Name: Yanchon918s
Email: [email protected]

Impact

An unauthenticated attacker could trigger server-side template evaluation by visiting a public form containing a Hidden field configured with a request-derived default value.

Because 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.

CVE-2026-52889 has a CVSS score of 9.8 (Critical). The vector is network-reachable, no privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (3.1.27); upgrading removes the vulnerable code path.

Affected versions

verbb/formie (< 3.1.27)

Security releases

verbb/formie → 3.1.27 (composer)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

Already deployed Kodem?

See it in your environmentNew to Kodem? Get a demo →

Remediation advice

Update to Formie 3.1.27 or later.

Frequently Asked Questions

  1. What is CVE-2026-52889? CVE-2026-52889 is a critical-severity security vulnerability in verbb/formie (composer), affecting versions < 3.1.27. It is fixed in 3.1.27.
  2. How severe is CVE-2026-52889? CVE-2026-52889 has a CVSS score of 9.8 (Critical). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
  3. Which versions of verbb/formie are affected by CVE-2026-52889? verbb/formie (composer) versions < 3.1.27 is affected.
  4. Is there a fix for CVE-2026-52889? Yes. CVE-2026-52889 is fixed in 3.1.27. Upgrade to this version or later.
  5. Is CVE-2026-52889 exploitable, and should I be worried? Whether CVE-2026-52889 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  6. What actually determines whether CVE-2026-52889 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  7. How do I fix CVE-2026-52889? Upgrade verbb/formie to 3.1.27 or later.

Other vulnerabilities in verbb/formie

Stop the waste.
Protect your environment with Kodem.