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.
{% 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.
Metrics
Affected Vendors & Products
Advisories
No advisories yet.
Fixes
Solution
No solution given by the vendor.
Workaround
No workaround given by the vendor.
References
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
|
Projects
Sign in to view the affected projects.
Status: PUBLISHED
Assigner: Symfony
Published:
Updated: 2026-11-24T13:07:53.166Z
Reserved: 2026-11-20T14:01:43.159Z
Link: CVE-2026-133770
No data.
Status : Received
Published: 2026-11-24T13:17:25.220
Modified: 2026-11-24T13:17:25.220
Link: CVE-2026-133770
No data.
OpenCVE Enrichment
No data.