Security mailing lists by PureSourceCode

CVE-2026-133772

LOW 2.3CVSS 4.0

Sandbox Tag Allow-List Bypass via the Branch of a `guard` Tag That Isn't Selected

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.

Published
24 Nov 2026
Last modified
1 Dec 2026
Assigned by
b5aa5c7f-767d-4597-9c64-3ac08b8711c6
NVD status
Awaiting Analysis
Weakness
CWE-863
Sources
NVDJSONCVE ListJSON

Scores

SourceScored byVersionScoreVector / decision
NVD b5aa5c7f-767d-4597-9c64-3ac08b8711c6 (Secondary) CVSS 4.0 LOW 2.3 CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
CVE List Symfony CVSS 4.0 LOW 2.3 CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N
CVE List CISA-ADP SSVC Exploitation: none; Automatable: no; Technical Impact: partial

Affected

SourceVendor / ecosystemProduct / packageAffected versionsFixed in
CVE List https://packagist.org twig/twig >= 3.15.0, < 3.31.0 3.31.0

References

History

  • 1 Dec 2026 20:28 UTC · CVE List: updated (other details)
  • 1 Dec 2026 20:28 UTC · NVD: updated (other details)
  • 25 Nov 2026 20:36 UTC · CVE List: first stored (published 24 Nov 2026)
  • 25 Nov 2026 20:11 UTC · NVD: first stored (published 24 Nov 2026)
An unhandled error has occurred. Reload ×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.