CVE-2026-71291: Bolt CMS Server-Side Template Injection via Unsandboxed allow_twig Field Rendering
Bolt CMS renders content field values through Twig's full application-level Environment with no SandboxExtension registered anywhere in the codebase. In src/Entity/Field.php, getTwigValue calls shouldBeRenderedAsTwig, which gates rendering only on the field definition's allowtwig flag and a regex checking for , , or ; when true, the raw field value is compiled and rendered via with no sandboxing.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Configuration
In Bolt CMS bundled configuration (e.g., bolt/contenttypes.yaml), set allow_twig to false for the affected content type (the default "pages" contenttype’s content field is set to allow_twig: true out of the box).
Bolt CMS (content type configuration) allow_twig = false
Event History
Frequently Asked Questions
What is the severity of CVE-2026-71291?
CVE-2026-71291 has a severity rating of high, with a score of 8.8.
What are the potential impacts of CVE-2026-71291?
CVE-2026-71291 could lead to critical security issues such as remote code execution due to server-side template injection.
How do I fix CVE-2026-71291?
To fix CVE-2026-71291, update to the latest version of Bolt CMS that mitigates this vulnerability.
Who is affected by CVE-2026-71291?
CVE-2026-71291 affects all users of Bolt CMS versions that allow the use of the allow_twig field without proper sandboxing.
What action should I take if I suspect exploitation of CVE-2026-71291?
If you suspect exploitation of CVE-2026-71291, immediately apply security patches, review logs for unauthorized access, and monitor system behavior.