GHSA-M6XJ-XX3F-5VV9
Vulnerability from github – Published: 2026-08-05 15:32 – Updated: 2026-08-05 15:32Bolt 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.
{
"affected": [],
"aliases": [
"CVE-2026-71291"
],
"database_specific": {
"cwe_ids": [
"CWE-1336"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-08-05T13:24:53Z",
"severity": "HIGH"
},
"details": "Bolt CMS renders content field values through Twig\u0027s 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\u0027s allow_twig flag and a regex checking for `{{`, `{%`, or `{#`; when true, the raw field value is compiled and rendered via `self::getTwig()-\u003ecreateTemplate($value)-\u003erender([\u0027record\u0027 =\u003e $this-\u003egetContent()])` with no sandboxing. Bolt\u0027s own bundled config/bolt/contenttypes.yaml sets `allow_twig: true` on the default \"pages\" contenttype\u0027s 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 `{{ [\u0027id\u0027]|map(\u0027passthru\u0027)|join }}` that executes arbitrary OS commands when the content is saved and rendered, achieving remote code execution as the web server user.",
"id": "GHSA-m6xj-xx3f-5vv9",
"modified": "2026-08-05T15:32:21Z",
"published": "2026-08-05T15:32:21Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-71291"
},
{
"type": "WEB",
"url": "https://github.com/bolt/core"
},
{
"type": "WEB",
"url": "https://github.com/bolt/core/blob/6.1/src/Entity/Field.php"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.