CVE-2026-71291
Received Received - Intake

Remote Code Execution in Bolt CMS via Twig Sandbox Bypass

Vulnerability report for CVE-2026-71291, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-08-05

Last updated on: 2026-08-05

Assigner: 309f9ea4-e3e9-4c6c-b79d-e8eb01244f2c

Description

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 allow_twig 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 `allow_twig: 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.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-08-05
Last Modified
2026-08-05
Generated
2026-08-05
AI Q&A
2026-08-05
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 2 associated CPEs
Vendor Product Version / Range
bolt cms *
bolt cms to 3.7.1 (exc)

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-1336 The product uses a template engine to insert or process externally-influenced input, but it does not neutralize or incorrectly neutralizes special elements or syntax that can be interpreted as template expressions or other code directives when processed by the engine.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This vulnerability in Bolt CMS allows authenticated users with edit access to execute arbitrary OS commands via Twig template injection. The issue occurs because Bolt CMS renders content fields through Twig without sandboxing, and the default content type has Twig rendering enabled. Attackers can inject malicious Twig code to achieve remote code execution as the web server user.

Detection Guidance

Check Bolt CMS versions prior to 3.7.1 for improper input validation. Inspect src/Entity/Field.php for getTwigValue() method usage without sandboxing. Look for allow_twig: true in contenttypes.yaml. Monitor for unexpected OS command execution traces in web server logs.

Impact Analysis

An attacker with edit access could execute arbitrary commands on the server, leading to full system compromise. This includes stealing sensitive data, installing malware, or using the server as a pivot point for further attacks. The impact is severe due to the high CVSS score (8.8) and the ease of exploitation.

Compliance Impact

This vulnerability could lead to unauthorized access to sensitive data, violating GDPR and HIPAA requirements for data protection. Organizations may face legal penalties, reputational damage, and loss of compliance certifications if exploited.

Mitigation Strategies

Update Bolt CMS to the latest version. Disable allow_twig in contenttypes.yaml. Restrict edit access to content types. Implement input validation for Twig templates. Monitor for suspicious activity in logs.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-71291. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart