CVE-2026-133771 Details
Description
The escaper considered x.attr, x['key'] and x.method() safe whenever {% import ... as x %} appeared anywhere in the template. Macro calls haven't needed this rule since Twig 3.0. It only matched ordinary variables that have the name of an alias imported in another block or macro, and printed them without escaping: {% block header %}{% import _self as item %}{{ item.hello() }}{% endblock %} {% block content %}{% for item in items %}{{ item.body }}{% endfor %}{% endblock %} Here, item.body is printed raw. This leads to XSS when the value comes from an attacker. The same happens with an import in a macro and an argument of the same name in another macro. It also happens with a template-level import placed after the block that uses the name. The rule is removed. Macro calls through an alias are still considered safe.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No CVSS 3.x data is available for this CVE.
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Nov 30, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/twigphp/Twig/commit/3a6745a0d88048474457fa2e69968ebd5267dd5a | b5aa5c7f-767d-4597-9c64-3ac08b8711c6 | |
| https://github.com/twigphp/Twig/security/advisories/GHSA-63v2-9rx5-wjgr | b5aa5c7f-767d-4597-9c64-3ac08b8711c6 | |
| https://symfony.com/cve-2026-133771 | b5aa5c7f-767d-4597-9c64-3ac08b8711c6 |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-116 | Improper Encoding or Escaping of Output | b5aa5c7f-767d-4597-9c64-3ac08b8711c6 |
| CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | b5aa5c7f-767d-4597-9c64-3ac08b8711c6 |
Affected Products
No affected product data is available for this CVE.
Change History
2 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Dec 1, 2026 | CVE Modified | CISA-ADP |
| Nov 24, 2026 | New CVE Received | b5aa5c7f-767d-4597-9c64-3ac08b8711c6 |