CVE-2026-133771
CVE-2026-133771 — Missing autoescaping for a variable named like a macro import alias of another scope
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.
Published Updated Sources: NVD, Twig (CNA), GitHub
Triage
Is it exploited, how likely is exploitation, what does it touch, and how severe do the scoring sources call it.
Exploitation
Unreported
no source claims exploitation
EPSS
n/a
FIRST has not published a score
CVSS base
2.3
low
Remediation
The vendor's own words where we have them.
Upgrade Twig/twig to a fixed release. Apply vendor patches per advisory and restrict external exposure of the affected component until patched.
First 24 hours
Ordered from the record's own fields — exposure first, because you cannot patch what you have not found.
- Identify exposed assets running affected vendor/product/version combinations.
- Prioritize based on EPSS, PoC availability, and external exposure.
- Search available logs for exploit probes, errors, authentication anomalies, or suspicious child processes matching the vulnerability class.
Affected scope
Vendor, product and version as the advisories word them.
| Vendor | Product | Versions | Status |
|---|---|---|---|
| Twig | twig/twig | 0 to < 3.31.0 | Vulnerable |
Attack characteristics
The CVSS vector, decoded. It describes the attack, not your exposure to it.
Attack Complexity
Low
Attack Vector
Network
Privileges Req
None
User Interaction
P
Every base score collected
Sources score independently and disagree; each row says who scored it and under which version.
| Score | Version | Severity | Expl. | Impact | Source |
|---|---|---|---|---|---|
| 2.3 | CVSS 4.0 | low | n/a | n/a | Twig (CNA) |
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
Weakness & attack patterns
- CWE-79Cross-site Scripting
- CWE-116
Inferred from the weakness class — not observed against this CVE.
Detection
Read off the CVSS vector and the weakness class. Starting points, not rules we have tested.
- Prioritize edge telemetry for network-reachable Twig/twig.
Timeline
What happened to this CVE, newest first — with the readings a source repeats on a schedule counted underneath rather than listed.
- 2026
Added · CVSS 3.1 2.3 (AV:N)
Nov 24, 2026 · NVD
Initial · CVE published
Nov 24, 2026 · NVD
References
3 on the record
- github.com/twigphp/Twig/commit/3a6745a0d88048474457fa2e69968ebd5267dd5a
Exploit, Third Party Advisory
- github.com/twigphp/Twig/security/advisories/GHSA-63v2-9rx5-wjgr
Exploit, Third Party Advisory
- symfony.com/cve-2026-133771
Vendor Advisory
Related CVEs
Same product first, then the same weakness or threat actor.
- CVE-2024-10441 Synology DiskStation Manager (DSM) Improper Encoding or Escaping of Output VulnerabilityCVSS 9.8 · CISA KEV
- CVE-2022-42948 Fortra Cobalt Strike User Interface Remote Code Execution VulnerabilityCVSS 9.8 · CISA KEV
- CVE-2019-3929 Crestron Multiple Products Command Injection VulnerabilityCVSS 9.8 · CISA KEV
- CVE-2024-42009 RoundCube Webmail Cross-Site Scripting VulnerabilityCVSS 9.3 · CISA KEV
- CVE-2024-38475 Apache HTTP Server weakness in mod_rewrite when first segment of substitution matches filesystem path.CVSS 9.1 · CISA KEV
- CVE-2023-34192 Synacor Zimbra Collaboration Suite (ZCS) Cross-Site Scripting (XSS) VulnerabilityCVSS 9.0 · CISA KEV
Elsewhere on this site
- Twigevery CVE for this vendor
- Cross-site Scriptingsame class
- CWE-79other pages naming this weakness
Not in any source we poll
Listed rather than left blank: an empty field and an unmeasured one look identical on screen, and only one is a reason to look elsewhere.
- No confirmed IOCs, IP addresses, domains, file hashes, or malware artifacts supplied.
- No organization-specific asset inventory, compensating-control status, or patch deployment evidence supplied.
- No exploit packet captures, log samples, or incident case IDs supplied.
Answered from this record1
What should defenders know first?
CVE-2026-133771 is Missing autoescaping for a variable named like a macro import alias of another scope, a low vulnerability affecting Twig/twig from Twig. The current evidence does not list it in CISA KEV, and the exploit status is: Active exploitation is not confirmed from current sources for CVE-2026-133771. Public exploit evidence is: A public PoC is not confirmed from current sources for CVE-2026-133771. The affected-version evidence is listed in the key facts and affected products tables. Defenders should first verify whether exposed or business-critical assets run those versions, then apply vendor patches or mitigations, restrict reachable attack surface, and preserve logs for detection review. CVSS 2.3 describes technical severity, while EPSS 0% helps estimate near-term exploit likelihood; neither replaces asset context. Unknown fields should remain explicit in tickets, and threat actor, IOC, victimology, or payload claims should not be added unless a cited source supports them. Monitor CISA KEV, vendor advisories, NVD changes, public PoC repositories, and internal telemetry for update triggers.