CVE-2026-133770

Sandboxed templates can rewrite application-owned `Markup` objects through their constructor

Published Nov 24, 2026 CVSS 4.0 · 2.1 Low EPSS n/a KEV · Not listed
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.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
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'}

Subscriptions

No data.

Weaknesses

Sources

Status
PUBLISHED
Assigner
Symfony
Published
Updated
Nov 24, 2026, 1:07 PM
Reserved
Nov 20, 2026, 2:01 PM
Status
Received
Published
Nov 24, 2026, 1:17 PM
Modified
Nov 24, 2026, 1:17 PM