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 with no sandboxing.
Published: 2026-08-05
Score: 8.8 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

Bolt CMS core renders content field values with Twig’s full environment without any sandboxing. The allow_twig flag enables rendering of raw field data, and the code compiles and executes the template when the content is rendered. A crafted Twig payload such as {{ ['id']|map('passthru')|join }} allows an attacker to run arbitrary OS commands, achieving remote code execution as the web server user.

Affected Systems

This flaw affects Bolt CMS core where the default pages content type sets allow_twig: true in the bundled configuration. Any user with edit permissions for that content type—including standard editors—can introduce malicious Twig payloads. Specific version numbers are not listed in the advisory, so all releases that ship the default pages content type configuration are potentially vulnerable.

Risk and Exploitability

The CVSS score is 8.8, signifying a high‑severity vulnerability. The EPSS score indicates a 0.00473 exploitation probability, roughly 0.47%. It is not listed in CISA KEV, yet the flaw enables a direct code execution path through the web interface. Attackers only need web access and edit capability to inject malicious data, then trigger rendering, resulting in uncontrolled execution of commands. The combination of high impact and the likelihood that many installations retain the default allow_twig setting makes this a critical security risk.

Generated by OpenCVE AI on August 10, 2026 at 20:55 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade Bolt CMS to a patched release that corrects the unsandboxed Twig rendering or removes the allow_twig flag for fields.
  • Disable or set allow_twig to false for all content types, or restrict its use to administrator accounts only to prevent non‑privileged users from injecting templates.
  • Implement a Twig sandbox extension or otherwise enforce safe template rendering to ensure templates cannot execute arbitrary PHP code.

Generated by OpenCVE AI on August 10, 2026 at 20:55 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Mon, 10 Aug 2026 12:00:00 +0000

Type Values Removed Values Added
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. 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 with no sandboxing.
Title Bolt CMS - Server-Side Template Injection via Unsandboxed allow_twig Field Rendering Bolt CMS Server-Side Template Injection via Unsandboxed allow_twig Field Rendering

Mon, 10 Aug 2026 11:45:00 +0000

Type Values Removed Values Added
Title Bolt CMS Server-Side Template Injection via Unsandboxed allow_twig Field Rendering Bolt CMS - Server-Side Template Injection via Unsandboxed allow_twig Field Rendering

Fri, 07 Aug 2026 10:30:00 +0000

Type Values Removed Values Added
First Time appeared Bolt
Bolt core
Vendors & Products Bolt
Bolt core

Wed, 05 Aug 2026 16:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Wed, 05 Aug 2026 13:15:00 +0000

Type Values Removed Values Added
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.
Title Bolt CMS Server-Side Template Injection via Unsandboxed allow_twig Field Rendering
Weaknesses CWE-1336
References
Metrics cvssV3_1

{'score': 8.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H'}


cve-icon MITRE

Status: PUBLISHED

Assigner: TuranSec

Published:

Updated: 2026-08-10T11:47:24.089Z

Reserved: 2026-08-05T12:37:57.357Z

Link: CVE-2026-71291

cve-icon Vulnrichment

Updated: 2026-08-05T15:47:29.433Z

cve-icon NVD

Status : Received

Published: 2026-08-05T13:24:53.820

Modified: 2026-08-10T12:17:31.753

Link: CVE-2026-71291

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-10T21:00:04Z

Weaknesses
  • CWE-1336

    Improper Neutralization of Special Elements Used in a Template Engine