Description
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.
Published: 2026-08-19
Score: 9.8 Critical
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

Formie, a Craft CMS form plugin, can transmit request‑derived default values for hidden fields directly into Twig’s renderString function. This causes any inserted Twig syntax in those inputs to be executed on the server. The flaw can expose sensitive data, alter application state, or even allow remote code execution, depending on the site’s configuration and available Twig functions. The vulnerability is classified as CWE‑1336.

Affected Systems

All installations of the Craft CMS plugin Formie from verbb, version 3.1.27 and earlier, are affected. The issue arises when public forms include hidden fields that use defaults derived from the HTTP User Agent, Referer URL, Current URL, Query Parameters, or Cookie values.

Risk and Exploitability

The CVSS base score is 9.8, indicating critical severity. EPSS is not available, so the exploitation probability is unknown but the flaw cannot be exploited without knowledge of the target form layout, making it less likely to be hit broadly. KEV does not list this vulnerability, but the impact remains significant. An unauthenticated attacker can craft a malicious request to a public form that uses an affected hidden field, leading the server to evaluate the injected Twig payload. Successful exploitation depends on the site’s Twig capabilities and could result in disclosure, modification, or arbitrary code execution.

Generated by OpenCVE AI on August 19, 2026 at 17:47 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade Formie to version 3.1.27 or newer, which removes the template rendering of request‑derived hidden field defaults.
  • If an upgrade cannot be performed immediately, delete or disable any hidden fields that use request‑derived defaults, and replace them with static values or with values validated against a whitelist.
  • After applying the patch or change, conduct a quick test by submitting a request with Twig syntax in a hidden field and verify that the response does not render the injected code.

Generated by OpenCVE AI on August 19, 2026 at 17:47 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-565m-g33j-jq96 Formie Hidden field defaults vulnerable to Server-Side Template Injection
History

Wed, 19 Aug 2026 17:45:00 +0000

Type Values Removed Values Added
First Time appeared Verbb
Verbb formie
Vendors & Products Verbb
Verbb formie

Wed, 19 Aug 2026 15:15:00 +0000

Type Values Removed Values Added
Description 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.
Title Formie: Server-Side Template Injection in Formie Hidden field defaults
Weaknesses CWE-1336
References
Metrics cvssV3_1

{'score': 9.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H'}


cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-08-19T18:05:26.381Z

Reserved: 2026-06-08T21:44:27.365Z

Link: CVE-2026-52889

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-08-19T15:17:09.957

Modified: 2026-08-19T18:16:43.520

Link: CVE-2026-52889

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-19T18:00:05Z

Weaknesses
  • CWE-1336

    Improper Neutralization of Special Elements Used in a Template Engine