CVE-2026-71291

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.
Configurations

No configuration.

History

23 Oct 2026, 21:10

Type Values Removed Values Added
Summary
  • (es) Bolt CMS renderiza los valores de los campos de contenido a través del entorno completo a nivel de aplicación de Twig sin ninguna SandboxExtension registrada en ninguna parte del código base. En src/Entity/Field.php, getTwigValue() llama a shouldBeRenderedAsTwig(), que restringe la renderización solo al indicador allow_twig de la definición del campo y a una expresión regular que verifica ’{{’, ’{%’ o ’{#’; cuando es verdadero, el valor del campo en bruto se compila y renderiza a través de ’self::getTwig() -> createTemplate($value) -> render([’record’ => $this -> getContent()])’ sin sandboxing. El propio paquete de Bolt config/bolt/contenttypes.yaml establece ’allow_twig: true’ en el campo de contenido del tipo de contenido predeterminado ’pages’ de forma predeterminada. Cualquier usuario con acceso de edición a ese tipo de contenido (un rol de editor estándar, no solo un administrador) puede inyectar una carga útil de Twig como ’{{ [’id’]|map(’passthru’)|join }}’ que ejecuta comandos arbitrarios del sistema operativo cuando el contenido se guarda y se renderiza, logrando ejecución remota de código como el usuario del servidor web.

10 Aug 2026, 12:17

Type Values Removed Values Added
Summary (en) 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. (en) 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.

05 Aug 2026, 13:24

Type Values Removed Values Added
New CVE

Information

Published : 2026-08-05 13:24

Updated : 2026-10-23 21:10


NVD link : CVE-2026-71291

Mitre link : CVE-2026-71291

CVE.ORG link : CVE-2026-71291


JSON object : View

Products Affected

No product.

CWE
CWE-1336

Improper Neutralization of Special Elements Used in a Template Engine