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

Tue, 24 Nov 2026 13:15:00 +0000

Type Values Removed Values Added
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.
Title Sandboxed templates can rewrite application-owned `Markup` objects through their constructor
Weaknesses CWE-79
CWE-863
References
Metrics cvssV4_0

{'score': 2.1, 'vector': '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'}


cve-icon MITRE

Status: PUBLISHED

Assigner: Symfony

Published: 2026-11-24T13:07:53.166Z

Updated: 2026-11-24T13:07:53.166Z

Reserved: 2026-11-20T14:01:43.159Z

Link: CVE-2026-133770

cve-icon Vulnrichment

No data.

cve-icon NVD

No data.

cve-icon Redhat

No data.