GHSA-565m-g33j-jq96: Formie Hidden field defaults vulnerable to Server-Side Template Injection
Formie versions 3.0.0-beta.1 through 3.1.26 for Craft 5 contain a critical vulnerability where Hidden fields using request-derived default values are vulnerable to server-side template injection (SSTI). An unauthenticated attacker can supply malicious Twig syntax via HTTP headers, URLs, query parameters, or cookies, which gets evaluated by the server when rendering the form. This can lead to sensitive data disclosure, application state modification, or remote code execution depending on the Twig environment and site configuration. The issue is fixed in Formie 3.1.27.
AI Analysis
Technical Summary
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.
GHSA-565m-g33j-jq96: Formie Hidden field defaults vulnerable to Server-Side Template Injection
Description
Formie versions 3.0.0-beta.1 through 3.1.26 for Craft 5 contain a critical vulnerability where Hidden fields using request-derived default values are vulnerable to server-side template injection (SSTI). An unauthenticated attacker can supply malicious Twig syntax via HTTP headers, URLs, query parameters, or cookies, which gets evaluated by the server when rendering the form. This can lead to sensitive data disclosure, application state modification, or remote code execution depending on the Twig environment and site configuration. The issue is fixed in Formie 3.1.27.
CVSS v3.1
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
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.
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/06/2026, 23:29:56 UTC
Views: 2
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
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
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.