Intel

AIKIDO-2026-438989

verbb/formie is vulnerable to Server-Side Template Injection (SSTI)

Server-Side Template Injection (SSTI)GHSA-g2xq-x66m-ww9r Published 4 days ago

88

High Risk

This Affects:

PHPverbb/formie
1.1.0 - 2.2.25
Fixed in 2.2.26
3.0.0 - 3.1.33
Fixed in 3.1.34
Are you affected? Scan for Free

TL;DR

Formie's anti-template-injection guard for populated field values uses a single-pass str_replace that does not re-scan its own output, so nested Twig delimiters such as {{{{7*7}}}} collapse back into an executable expression. A custom-default Hidden field then renders that value through Craft's unsandboxed view engine, so values supplied through the populateFormValues map (via the GraphQL templateHtml argument or the craft.formie.populateFormValues Twig variable) reach server-side Twig. Externally influenced input can therefore trigger information disclosure, application state changes, and potential remote code execution. The fix strips delimiters until stable and parses Hidden custom defaults through the sandboxed Variables engine.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and you render a form containing a Hidden field whose default value is set to Custom while populating field values from untrusted GraphQL arguments or request-derived template variables.

Background info

verbb/formie is vulnerable to Server-Side Template Injection (SSTI) in versions 1.1.0 - 2.2.25 and 3.0.0 - 3.1.33.

How to fix this

Upgrade the verbb/formie library to the patch version.