CVE-2026-45697 Formie: Pre-authenticated server-side template injection in Hidden fields

Critical 9.8 Published Updated

Unauthenticated attackers can execute arbitrary code via Twig injection in Formie Hidden fields, compromising the Craft CMS site.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2026-45697?

CVE-2026-45697 is a critical code injection vulnerability in verbb formie, published on 29 May 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

Formie is a Craft CMS plugin for creating forms. Prior to 2.2.20 and 3.1.24, unauthenticated users could submit crafted values into Hidden fields (with Default value → Custom) that were evaluated as Twig during submission handling, which could lead to serious compromise of the Craft site (depending on template/sandbox behavior). This vulnerability is fixed in 2.2.20 and 3.1.24.

Weakness: CWE-94, CWE-693, CWE-1336

Which versions are affected by CVE-2026-45697?

4 open source packages ship an affected version, including verbb/formie.

PackageAffectedFixed in
verbb/formie PackagistAll versions2.2.20
verbb/formie PackagistAll versions2.2.20
verbb/formie PackagistFrom 3.0.0-beta.13.1.24
verbb/formie PackagistFrom 3.0.0-beta.13.1.24

How do I fix CVE-2026-45697?

Upgrade verbb/formie to a fixed version for your release line: 2.2.20 or 3.1.24.

Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.

Is CVE-2026-45697 being exploited?

There is no known exploitation of CVE-2026-45697 in the wild and no public exploit code.

Sources

Also known as GHSA-x7m9-mwc2-g6w2.

Is CVE-2026-45697 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free