Code InjectionWeakness · CWE-94

CVE-2026-45697

CRITICAL · 9.8 CVSS v3.1 Published 2026-05-29
Patch available
A vendor patch is available. No clean upgrade release — apply the published patch.
See remediation →
100/100
Remediation priority · Urgent
Remotely reachable No privileges Zero-click Patch available

Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.

NVD · unedited
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.

Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.

dbcve analysis · high confidence

Formie plugin for Craft CMS allows unauthenticated users to inject Twig code through Hidden fields configured with Custom default values. During form submission, these crafted values are evaluated as Twig templates, enabling potential remote code execution depending on template/sandbox settings.

MitigationUpgrade Formie to version 2.2.20 (for Formie 2.x) or 3.1.24 (for Formie 3.x) immediately. If immediate upgrade is not feasible, disable or remove any Hidden fields using Custom default values until patching is complete.

Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.

CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.

From the vector
Attack vector
Network
Complexity
Low
Privileges
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

Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.

dbcve checks

Work through these to decide whether this CVE applies to you.

  1. Confirm Formie plugin is installed
    Navigate to the Craft CMS plugin store or check the /admin/plugins dashboard to verify Formie is installed and note its current version number
    Affected if Formie plugin is present in the Craft CMS installation
  2. Check installed Formie version
    View the installed version in the Craft CMS control panel under Settings > Plugins > Formie, or check the composer.json file in the vendor directory for the formie plugin version entry
    Affected if Version is earlier than 2.2.20 or 3.1.24, or the version cannot be determined
  3. Identify Hidden fields using Custom default values
    In Formie plugin settings, go to each form and inspect all Hidden field configurations. Look for fields where the Default Value setting is set to 'Custom' rather than 'Static' or 'None'
    Affected if Any Hidden field has 'Custom' selected as the default value type, allowing Twig input
  4. Inspect the custom default value content
    For each Hidden field with Custom default values, view the actual Twig code entered in the default value field and check for potentially malicious template syntax or injection attempts
    Affected if The custom default value contains user-supplied or unsanitized Twig template syntax that could be exploited

A user is affected if Formie is installed with a version before 2.2.20 or 3.1.24 AND any form contains a Hidden field configured with a Custom default value that accepts Twig input.

Generated from the published advisory. Verify against your own configuration.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.

dbcve · scoped
Patch available Apply the vendor patch
Vendor patch github.com →
Interim mitigation

Upgrade Formie to version 2.2.20 (for Formie 2.x) or 3.1.24 (for Formie 3.x) immediately. If immediate upgrade is not feasible, disable or remove any Hidden fields using Custom default values until patching is complete.

Recommended fix High confidence

Formie 2.2.20+ (for 2.x line) or 3.1.24+ (for 3.x line)

  1. Identify your current Formie plugin version by checking the composer.json or Craft CMS plugin store
  2. If using Formie 2.x, upgrade to version 2.2.20 or later
  3. If using Formie 3.x, upgrade to version 3.1.24 or later
  4. Run composer update verbb/formie or use the Craft CMS plugin store to apply the update
  5. Clear Craft CMS caches after upgrade (Settings → Clear Caches)
  6. Verify the upgrade was successful by checking the plugin version
Caveat Check release notes for any breaking changes between your current version and the target version before upgrading

Generated from the published advisory — verify against the referenced sources before acting.

Have this fixed Scoped from the published advisory
  • Consultation2.0 h
  • Implementation1.0 h
  • Testing3.0 h
  • Review / QA2.0 h
8.0 hours of engineering $1,390
Get the patch applied

An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $2,224.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2026-45697 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.

References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.

Primary sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2026-45697 in production — separate from our analysis above.

No notes yet

Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.

What this is

A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.

What belongs here
  • Verified mitigations, workarounds, and config changes
  • Version or environment caveats, and links to real fixes
  • No weaponised exploit code, or anything meant to cause harm
  • No spam, self-promotion, credentials, or personal data