{ "dataType": "CVE_RECORD", "dataVersion": "5.2", "cveMetadata": { "cveId": "CVE-2026-133770", "assignerOrgId": "b5aa5c7f-767d-4597-9c64-3ac08b8711c6", "state": "PUBLISHED", "assignerShortName": "Symfony", "dateReserved": "2026-11-20T14:01:43.159Z", "datePublished": "2026-11-24T13:07:53.166Z", "dateUpdated": "2026-11-24T13:07:53.166Z" }, "containers": { "cna": { "providerMetadata": { "orgId": "b5aa5c7f-767d-4597-9c64-3ac08b8711c6", "shortName": "Symfony", "dateUpdated": "2026-11-24T13:07:53.166Z" }, "title": "Sandboxed templates can rewrite application-owned `Markup` objects through their constructor", "datePublic": "2026-11-24T12:58:46.000Z", "descriptions": [ { "lang": "en", "value": "The sandbox allows every method of Twig\\Markup objects, including their public constructor. A sandboxed template can therefore call __construct() on any Markup object that it reaches, and replace its content:\n\n{% do banner.__construct('', 'UTF-8') %}\n\nA template gains nothing by rewriting its own output. The impact is on the Markup objects that come from the application and are also rendered elsewhere, like a global in a long-running worker. Their new content then ends up in trusted pages that aren't sandboxed.\n\nThe sandbox no longer allows calling the constructor of Markup objects.", "supportingMedia": [ { "type": "text/markdown", "base64": false, "value": "The sandbox allows every method of `Twig\\Markup` objects, including their public constructor. A sandboxed template can therefore call `__construct()` on any `Markup` object that it reaches, and replace its content:\n\n```twig\n{% do banner.__construct('', 'UTF-8') %}\n```\n\nA template gains nothing by rewriting its own output. The impact is on the `Markup` objects that come from the application and are also rendered elsewhere, like a global in a long-running worker. Their new content then ends up in trusted pages that aren't sandboxed.\n\nThe sandbox no longer allows calling the constructor of `Markup` objects." } ] } ], "affected": [ { "vendor": "Twig", "product": "twig/twig", "collectionURL": "https://packagist.org", "packageName": "twig/twig", "repo": "https://github.com/twigphp/Twig", "defaultStatus": "unaffected", "versions": [ { "version": "0", "status": "affected", "lessThan": "3.31.1", "versionType": "semver" } ] } ], "problemTypes": [ { "descriptions": [ { "lang": "en", "cweId": "CWE-79", "description": "CWE-79 Improper Neutralization of Input During Web Page Generation", "type": "CWE" } ] }, { "descriptions": [ { "lang": "en", "cweId": "CWE-863", "description": "CWE-863 Incorrect Authorization", "type": "CWE" } ] } ], "metrics": [ { "format": "CVSS", "scenarios": [ { "lang": "en", "value": "GENERAL" } ], "cvssV4_0": { "version": "4.0", "vectorString": "CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:P/VC:N/VI:L/VA:N/SC:L/SI:L/SA:N", "baseScore": 2.1, "baseSeverity": "LOW" } } ], "references": [ { "url": "https://symfony.com/cve-2026-133770", "name": "CVE-2026-133770", "tags": [ "vendor-advisory" ] }, { "url": "https://github.com/twigphp/Twig/security/advisories/GHSA-r34x-hh9h-9q9c", "name": "GHSA-r34x-hh9h-9q9c", "tags": [ "vendor-advisory" ] }, { "url": "https://github.com/twigphp/Twig/commit/97b2e40b1165e6a42a197843f96ccb0a55f46f34", "tags": [ "patch" ] } ], "credits": [ { "lang": "en", "value": "Fabien Potencier", "type": "remediation developer" } ], "source": { "advisory": "GHSA-r34x-hh9h-9q9c", "discovery": "UNKNOWN" }, "x_generator": { "engine": "symfony/ghsa-to-cve" } } } }