CVE-2026-133765: twig/twig Auth Bypass

CVE-2026-133765

NVD

Vulnerability Summary

The sandbox checks that a template may call toString() on an object before converting it to a string. Since Twig 3.23.0, assignments like x = obj, and the destructuring forms [a] = list and {a} = obj, evaluate to the value that they assign. The sandbox didn't check that value, so a sandboxed template could call a denied toString() method:

{{ (x = obj) }}
{{ ({secret: s} = obj)|join }}

No tag needs to be allowed.

The sandbox now checks the result of assignments like the result of filters and functions. {% do x = obj %} and {% if (x = obj) %} still work, since they don't convert the value to a string.
Severity Level
MEDIUM(5.3)
Published Date
Nov 24, 2026
Last Modified
Nov 24, 2026
Exploitation Status
No confirmed exploitation yet
EPSS Score (30-Day)
0.53%Probability
Root Weakness (CWE)
The product does not use or incorrectly uses a protection mechanism that provides sufficient defense against directed attacks.
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 5.3 (MEDIUM)
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N
Attack VectorNetwork
Attack ComplexityLow
Attack RequirementsNone
Privileges RequiredLow
User InteractionNone
Confidentiality (Vulnerable System)Low
Integrity (Vulnerable System)None
Availability (Vulnerable System)None
Confidentiality (Subsequent System)None
Integrity (Subsequent System)None
Availability (Subsequent System)None

Affected & Patched Versions

Affected Versions
  • twig/twig >= 3.23.0 and < 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-133765. 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