CVE-2026-133766

LowCVSS 2.3/10Last modified Dec 1, 2026

Description

Since Twig 3.28.0, the sandbox skips the toString() check of an argument whose PHP parameter can't hold a string, like an int. A spread argument was mapped to a single parameter, although it fills every parameter from its position on. A sandboxed template could therefore call a denied toString() method:

{{ tag(...[1, obj]) }}

Here, the first parameter of tag() is an int, and a later one accepts strings. Applications are affected when they allow such a function, filter or test in the sandbox. No built-in callable is affected.

A spread argument is now checked unless every parameter that it can fill has a safe type.

Metrics

CVSS 4.0 2.3/10CVSS: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

Weakness enumeration

Affected software

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

VendorProductVersions
Twigtwig/twig>= 3.28.0, < 3.31.1

References

Timeline

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

Related CVEs from 2026

CVE-2026-1337675.3When the parent of an embed tag was an expression other than a string or a variable, the sandbox didn't see that expression. The functions, CVE-2026-1337685.3The join filter converted a value that isn't iterable with (array) $value. For an object, that gives every property, including the private aCVE-2026-1337692.3Cva::apply() converted the values of variants, default variants and compound variants with (array). These values come from the arguments of CVE-2026-133774.8Improper Neutralization of Input During Web Page Generation (XSS or 'Cross-site Scripting') vulnerability in WatchGuard Fireware OS SIP ProxCVE-2026-1337702.1The sandbox allows every method of Twig\Markup objects, including their public constructor. A sandboxed template can therefore call __constrCVE-2026-1337712.3The escaper considered x.attr, x['key'] and x.method() safe whenever {% import ... as x %} appeared anywhere in the template. Macro calls haCVE-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-133766: Low severity, CVSS 2.3 | Vulnix