Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

Formie Hidden field defaults vulnerable to Server-Side Template Injection (CVE-2026-52889)

0
Critical
Published: 07/06/2026 (07/06/2026, 16:52:16 UTC)
Source: GCVE Database
Product: verbb/formie

Description

## 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: [[email protected]](mailto:[email protected])

CVSS v3.1

Score 9.8critical

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Affected software

Packagistghsa
verbb/formie
Affected versions
<3.1.27

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 07/06/2026, 23:29:56 UTC

Technical Analysis

The vulnerability exists in the Formie plugin for Craft 5, specifically in the Hidden field type when configured with dynamic default values derived from HTTP requests (User Agent, Referer URL, Current URL, Query Parameter, or Cookie Value). These values were passed unchecked to Craft's Twig rendering engine during front-end form rendering, allowing unauthenticated attackers to inject and execute arbitrary Twig code server-side. The flaw is due to improper handling of request-derived defaults, which were rendered as Twig templates instead of plain strings. The patch in version 3.1.27 restricts Twig rendering to admin-authored templates only, treating request-derived defaults as plain text.

Potential Impact

An unauthenticated attacker can exploit this vulnerability by visiting a public form with a vulnerable Hidden field, injecting malicious Twig syntax via request parameters. This can result in disclosure of sensitive information, unauthorized modification of application state, or remote code execution, depending on the server's Twig environment and configuration. The vulnerability is critical due to its potential for full system compromise without authentication.

Mitigation Recommendations

Update Formie to version 3.1.27 or later, where this vulnerability is patched. Until the update is applied, avoid using request-derived default values in Hidden fields on public forms, including HTTP User Agent, Referer URL, Current URL, Query Parameters, and Cookie Values. Alternatively, remove any affected Hidden fields from public forms to prevent exploitation.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Gcve Source
db.gcve.eu
Osv Id
GHSA-565m-g33j-jq96
Osv Schema Version
1.4.0
Aliases
["CVE-2026-52889"]
Ecosystems
["Packagist"]
Database Specific Severity
CRITICAL
Cvss Version
3.1

Threat ID: 6a4c345527e9c797195fe1da

Added to database: 07/06/2026, 23:03:49 UTC

Last enriched: 07/06/2026, 23:29:56 UTC

Last updated: 07/31/2026, 12:27:30 UTC

Views: 39

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses