CVE-2026-133771

LowCVSS 2.3/10Last modified Dec 1, 2026

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 2.3/10CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/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

Weakness enumeration

Affected software

Source: the vendor's advisory (CNA). NVD analysis pending.

VendorProductVersions
Twigtwig/twig< 3.31.0

References

Timeline

Published
Nov 24, 2026
Last modified
Dec 1, 2026
NVD status
Awaiting Analysis

Related CVEs from 2026

CVE-2026-1337722.3The guard tag compiles only one of its branches, depending on whether a callable exists. The other branch was still parsed, though. The exteCVE-2026-1337732.3The html_to_markdown filter of twig/markdown-extra keeps an HtmlConverter for each distinct mapping of options it receives. They're kept in CVE-2026-1337746.3A live component protected by #[IsGranted], on its class or on its default action, can be rendered by a caller who is not granted access. POCVE-2026-1337755.3The fix for CVE-2026-55877 (GHSA-6v8j-33hc-mv84) sanitizes the SVG of icons before they are rendered inline. It removes scripts and event haCVE-2026-1337765.3The fix for CVE-2026-55877 (GHSA-6v8j-33hc-mv84) sanitizes the SVG of icons before they are rendered inline. When the sanitizer changes an iCVE-2026-1337775.3The fix for CVE-2026-55877 (GHSA-6v8j-33hc-mv84) sanitizes the SVG of icons before they are rendered inline. Browsers parse an inline <svg> CVE-2026-1337786.3#[AsLiveComponent(route: '...')] makes a live component send its requests to another route. The documentation suggests it so that the componCVE-2026-1337795.3The fix for CVE-2026-55877 (GHSA-6v8j-33hc-mv84) sanitizes the SVG of icons before they are rendered inline. The checks matched attribute naCVE-2026-133787.2The Form Vibes – Database Manager for Forms plugin for WordPress is vulnerable to Stored Cross-Site Scripting via Contact Form 7 Form Field CVE-2026-1337807.3The @symfony/stimulus-bridge npm package includes a Webpack loader called lazy-controller-loader that supports "magic comments" placed aboveCVE-2026-1337817.3The controllers.json loader of @symfony/stimulus-bridge loads the package.json file of each package listed in controllers.json with require(CVE-2026-133799.1The Windows interactive service in OpenVPN 2.7_alpha1 through 2.7.4 allows remote attackers to cause persistent DNS state pollution or a ser
CVE-2026-133771: Low severity, CVSS 2.3 | Vulnix