CVE-2026-133770: twig/twig XSS

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.
Severity Level
LOW(2.1)
Published Date
Nov 24, 2026
Last Modified
Nov 24, 2026
Exploitation Status
No confirmed exploitation yet
EPSS Score (30-Day)
0.55%Probability
Root Weakness (CWE)
The software does not neutralize user-controllable input before it is placed in output that is used as a web page.
The product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check.
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:N
Attack 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

Affected Versions
  • twig/twig < 3.31.1
Patched Versions
  • twig/twig 3.31.1

What to do

Fix it during your normal patch cycle. No exploitation is confirmed yet.

  1. Check whether you run twig/twig and which version.
  2. 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 alerts

Data last checked: Nov 30, 2026 11:12 UTC