Sandboxed templates can rewrite application-owned `Markup` objects through their constructor
Summary
| CVE | CVE-2026-133770 |
|---|---|
| State | PUBLISHED |
| Assigner | Symfony |
| Source Priority | CVE Program / NVD first with legacy fallback |
| Published | 2026-11-24 13:17:25 UTC |
| Updated | 2026-11-24 13:17:25 UTC |
| Description | 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: {% do banner.__construct('<script>alert(1)</script>', 'UTF-8') %} A 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. The sandbox no longer allows calling the constructor of Markup objects. |
Risk And Classification
Primary CVSS: v4.0 2.1 LOW from b5aa5c7f-767d-4597-9c64-3ac08b8711c6
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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Problem Types: CWE-79 | CWE-863 | CWE-79 CWE-79 Improper Neutralization of Input During Web Page Generation | CWE-863 CWE-863 Incorrect Authorization
| Version | Source | Type | Score | Severity | Vector |
|---|---|---|---|---|---|
| 4.0 | b5aa5c7f-767d-4597-9c64-3ac08b8711c6 | Secondary | 2.1 | LOW | 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/E:X/C... |
| 4.0 | CNA | CVSS | 2.1 | LOW | 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 |
CVSS v4.0 Breakdown
Attack Vector
NetworkAttack Complexity
LowAttack Requirements
PresentPrivileges Required
LowUser Interaction
PassiveConfidentiality
NoneIntegrity
LowAvailability
NoneSub Conf.
LowSub Integrity
LowSub Availability
NoneCVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:P/VC:N/VI:L/VA:N/SC:L/SI:L/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Vendor Declared Affected Products
References
| Reference | Source | Link | Tags |
|---|---|---|---|
| github.com/twigphp/Twig/commit/97b2e40b1165e6a42a197843f96ccb0a55f46f34 | b5aa5c7f-767d-4597-9c64-3ac08b8711c6 | github.com | |
| symfony.com/cve-2026-133770 | b5aa5c7f-767d-4597-9c64-3ac08b8711c6 | symfony.com | |
| github.com/twigphp/Twig/security/advisories/GHSA-r34x-hh9h-9q9c | b5aa5c7f-767d-4597-9c64-3ac08b8711c6 | github.com | |
| CVE Program record | CVE.ORG | www.cve.org | canonical |
| NVD vulnerability detail | NVD | nvd.nist.gov | canonical, analysis |
Vendor Comments And Credit
Discovery Credit
CNA: Fabien Potencier (en)
There are currently no legacy QID mappings associated with this CVE.