CVE-2026-133770
NVD
Vulnerability Summary
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.
CVSS v4.0 Base Metrics — Score 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:NAttack VectorNetwork
Attack ComplexityLow
Attack RequirementsPresent
Privileges RequiredLow
User InteractionPassive
Confidentiality (Vulnerable System)None
Integrity (Vulnerable System)Low
Availability (Vulnerable System)None
Confidentiality (Subsequent System)Low
Integrity (Subsequent System)Low
Availability (Subsequent System)None
Affected & Patched Versions
- twig/twig < 3.31.1
- twig/twig 3.31.1
What to do
Fix it during your normal patch cycle. No exploitation is confirmed yet.
- Check whether you run twig/twig and which version.
- Update to a patched version listed above, then confirm the new version.
Timeline
- Nov 24, 2026Published
- Nov 24, 2026Record last modified
Score, severity and exploitation changes are tracked from the day Watchtower started logging them.
Get notified about new twig/twig CVEsYou are reading CVE-2026-133770. Get an email when KEV listings, exploits or new CVEs match your stack.
Set up CVE alertsExternal References
Data last checked: Nov 30, 2026 11:12 UTC