Critical

Formie Hidden field defaults vulnerable to Server-Side Template Injection

  • Disclosed: 06.07.2026
  • Updated: 11.10.2026 10:22

Summary

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

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.

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.

Patches

Update to Formie 3.1.27 or later.

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: ao9s@ao9s.net

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
Composer package verbb/formie < 3.1.27 3.1.27

References

CVSS score 9.8/10
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Weakness (CWE)
CWE-1336
Platform
Composer
Package
verbb/formie
Disclosed
06.07.2026
Updated
11.10.2026 10:22

Sources and licenses

OSV / GitHub Advisory Database - GHSA-565m-g33j-jq96 - CC BY 4.0

Vulnerability history: verbb/formie

All published vulnerabilities of this package (Composer package), newest first. Shows whether this is a one-off slip or a package that needs watching.

All (10) in the archive
Total entries
10
First → latest
05.2024 09.2026
Without a fix
0
Exploited in attacks
0

Severity breakdown

  • Critical 2
  • High 4
  • Medium 4

Disclosures per year

  1. 2024: 1
  2. 2025: 2
  3. 2026: 7
Severity:
  1. High · 7.7 CVE-2026-76089 >= 3.0.0, < 3.1.31, < 2.2.23 3.1.31, 2.2.23
  2. High · 8.2 CVE-2026-76087 >= 3.0.0, < 3.1.31, < 2.2.23 3.1.31, 2.2.23
  3. High · 8.5 CVE-2026-76086 >= 3.0.0, < 3.1.31, < 2.2.23 3.1.31, 2.2.23
  4. Formie Hidden field defaults vulnerable to Server-Side Template Injection this entry
    Critical · 9.8 CVE-2026-52889 < 3.1.27 3.1.27
  5. High CVE-2026-47266 >= 3.0.0, < 3.1.26, < 2.2.21 3.1.26, 2.2.21
  6. Critical · 9.8 CVE-2026-45697 >= 3.0.0-beta.1, < 3.1.24, < 2.2.20 3.1.24, 2.2.20

Know which vulnerabilities affect your application

With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.