CVE-2026-133772

LOWCVSS 2.3/10EPSS 0.53%

Last modified

CVE-2026-133772 is a low-severity vulnerability rated 2.3/10 on the CVSS scale. The guard tag compiles only one of its branches, depending on whether a callable exists. The other branch was still parsed, though. EPSS estimates a 0.53% chance of exploitation in the next 30 days.

Description

The guard tag compiles only one of its branches, depending on whether a callable exists. The other branch was still parsed, though. The extends, use, macro and block tags in it registered their effects on the template. The sandbox doesn't see these tags, since that branch isn't compiled. A sandboxed template allowed to use guard could therefore extend a template, import blocks and define macros, while the policy doesn't allow these tags: {% guard filter upper %}{% else %}{% extends "parent.html" %}{% endguard %} The templates reached this way come from the loader of the sandbox, and they are sandboxed too. What the branch that isn't selected registers on the parser is now discarded.

Metrics

Weakness Enumeration

Affected Software

Source: CNA advisory (CVE.org). NVD analysis pending.

VendorProductVersions
Twigtwig/twig>= 3.15.0, < 3.31.0

References

Timeline

Published
Last Modified
Status
Awaiting Analysis

Frequently Asked Questions

What is CVE-2026-133772?
The guard tag compiles only one of its branches, depending on whether a callable exists. The other branch was still parsed, though. The extends, use, macro and block tags in it registered their effects on the template. The sandbox doesn't see these tags, since that branch isn't compiled. A sandboxed template allowed to use guard could therefore extend a template, import blocks and define macros, while the policy doesn't allow these tags: {% guard filter upper %}{% else %}{% extends "parent.html" %}{% endguard %} The templates reached this way come from the loader of the sandbox, and they are sandboxed too. What the branch that isn't selected registers on the parser is now discarded.
How severe is CVE-2026-133772?
CVE-2026-133772 has a CVSS score of 2.3/10 (LOW severity). The EPSS model estimates a 0.53% probability of exploitation in the next 30 days.
How do I fix CVE-2026-133772?
Check the vendor references and advisories linked above for patched versions and mitigation guidance. You can also run a Strix scan to test if your systems are affected.

How Strix Helps

Related CVEs from 2026

Are you affected by CVE-2026-133772?

Run a free Strix scan to check your systems for this vulnerability.

Scan your code now

Source: NVD / NIST