CVE-2026-133771

low
EUVD alias: EUVD-2026-133920
Assigned by CNA: symfony
Published 2026-11-24 · Modified 2026-12-01
CVSS v3
—
CVSS v4 NEW
2.3
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
VIR risk
2.3

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.

Predictions

Exploit likelihood
20%
Patch ETA
—

Heuristic predictions, AS-IS, for prioritization only.

Mitigations

No mitigations published for this CVE yet.

The vendor-content worker queues fetches as references arrive (check back in a few minutes). Or — if you've already worked around this in production — publish your fix to the community-verified tier.

Propose a mitigation on Community Mitigations published via the community go through AI scoring + 2 human reviewers + 7-day silent objection window before landing here with source_tier=community-verified.

OS impact

debian Debian Mixed 4 releases
VersionPackageStatusFixed in
trixie php-twig Affected —
sid php-twig Fixed 3.31.0-1
forky php-twig Fixed 3.31.0-1
bookworm php-twig Affected —

Package impact

EcosystemPackageVulnerableFixed
php Packagisttwig/twig>=1.0.0,<2.0.0|>=2.0.0,<3.0.0|>=3.0.0,<3.31.0

Application impact

VendorProductVersionsFixed
twigtwig_twig{"endExcluding":"3.31.0"}3.31.0

References

CWEs

CWE-79 CWE-116

Community-verified mitigations for this CVE will appear above when contributors publish them.

Verify integrity in audit chain (admin only). AS-IS.