CVE-2026-52889: Formie: Server-Side Template Injection in Formie Hidden field defaults
Formie is a Craft CMS plugin for creating forms. Prior to 3.1.27, Formie can pass request-derived Hidden field defaults such as HTTP User Agent, Referer URL, Current URL, Current URL without Query String, Query Parameter, and Cookie Value to Craft's Twig rendering layer during front-end form rendering. An unauthenticated attacker can place Twig syntax in one of these request-controlled inputs when a public form contains an affected Hidden field. Hidden::getFrontEndInputOptions() then assigns the value to defaultValue and calls renderString, causing server-side template evaluation rather than treating the request data as a plain string. Depending on the Craft site configuration and available Twig capabilities, exploitation can disclose sensitive information, modify application state, or achieve remote code execution. This issue is fixed in version 3.1.27.
Security readout for executives and security teams
Plain-English summary
A public form can cause attacker-controlled request data to be evaluated as a server-side template. On vulnerable Craft CMS sites, this could expose secrets, alter data, disrupt service, or potentially enable remote code execution. The affected Formie versions are earlier than 3.1.27.
Executive priority
Treat as an immediate remediation priority for internet-facing Craft CMS sites using Formie. Rapidly identify vulnerable versions and affected forms, then upgrade. The absence of documented active exploitation lowers certainty about current attacks, but not the potentially severe business impact or ease indicated by the vulnerability details.
Technical view
Formie Hidden field defaults can copy request-controlled values into defaultValue and pass them to Craft’s Twig renderString function. If a public form uses an affected default source, Twig syntax in headers, URLs, query parameters, or cookies may be evaluated server-side without authentication.
Likely exposure
Exposure requires Formie earlier than 3.1.27, a publicly reachable form, and an affected Hidden field default. Potentially affected sources include User Agent, Referer URL, current URL variants, query parameters, and cookie values. Sites without that configuration are not shown to be exploitable by the supplied evidence.
Exploitation context
The CVSS 3.1 score is 9.8 because exploitation can be remote, unauthenticated, low-complexity, and require no user interaction. The supplied bundle does not identify CISA KEV listing, active exploitation, public exploit code, or confirmed attacks. Actual impact depends on Craft configuration and available Twig capabilities.
Researcher notes
CWE-1336 applies: user-influenced data reaches a template engine as executable template content. The critical sink is Hidden::getFrontEndInputOptions() calling renderString after setting defaultValue. The supplied commit and 3.1.27 release document the correction. No reliable attack indicators or exploitation-in-the-wild evidence are included.
Mitigation direction
Upgrade Formie to version 3.1.27 or later.
Identify public forms using request-derived Hidden field defaults.
Prioritize internet-facing production sites and systems holding sensitive data.
Consult the vendor advisory and release notes before deployment.
Until upgraded, consider removing affected Hidden defaults from publicly accessible forms.
Validation and detection
Confirm the installed Formie version is 3.1.27 or later.
Inventory public forms and inspect their Hidden field default configurations.
Verify affected request-derived defaults are absent or handled safely after remediation.
Preserve and review relevant web logs; the supplied sources provide no published indicators.
Test remediation in a controlled environment without using production secrets.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cwe · low confidence lookup
CWE-1336: Exact CWE lookup
Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
The CVE wording references code or command execution, so execution technique review may help defensive triage. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
1CVSS vectors
3Timeline events
1ADP providers
4Source links
SSVC decision data
CISA-ADPCISA Coordinator
Timestamp
Version
2.0.3
Exploitation: noneAutomatable: yesTechnical Impact: total
CVSS vector scores
1 official score
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.
CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.
CWE-1336 · source CWE mapping
Improper Neutralization of Special Elements Used in a Template Engine
Improper Neutralization of Special Elements Used in a Template Engine represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.