CVE-2026-71291: Bolt CMS Server-Side Template Injection via Unsandboxed allow_twig Field Rendering

Published Aug 5, 2026
·
Updated

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 self::getTwig()->createTemplate($value)->render(['record' => $this->getContent()]) with no sandboxing. Bolt's own bundled config/bolt/contenttypes.yaml sets allowtwig: true on the default "pages" contenttype's content field out of the box. Any user with edit access to that content type (a standard editor role, not just an administrator) can inject a Twig payload such as {{ ['id']|map('passthru')|join }} that executes arbitrary OS commands when the content is saved and rendered, achieving remote code execution as the web server user.

Affected Software

1 affected component
Bolt CMS Bolt CMS

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Configuration

    In src/bolt/contenttypes.yaml, set allow_twig: false for the default "pages" content type so Twig field rendering is disabled (prevents Twig payload execution on save/render).

    Bolt CMS content type (contenttypes.yaml) - pages allow_twig = false
  2. Compensating control

    Restrict edit access for the affected Bolt CMS content type(s) so that only trusted admins (not standard editor roles) can create/modify fields that support allow_twig rendering, reducing the chance of Twig payload injection.

Event History

Aug 5, 2026
CVE Published
via MITRE·12:38 PM
Data Sourced
via MITRE·12:38 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·01:24 PM
DescriptionSeverityWeakness
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-71291?

CVE-2026-71291 has a severity rating of high, with a score of 8.8.

2

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.

3

How do I fix CVE-2026-71291?

To fix CVE-2026-71291, update to the latest version of Bolt CMS that mitigates this vulnerability.

4

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.

5

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.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203