CVE-2026-133764

LowCVSS 2.3/10Last modified Dec 1, 2026

Description

The sandbox checks that a template may call toString() on an object before converting it to a string. It didn't check the input of tests. The PHP callable of a test may convert this input to a string, for example when its parameter is typed as string. PHP then calls toString() on an object without the sandbox checking it first:

{{ obj is upperish }}

Applications are affected when they register such a test and allow it in the sandbox. No built-in test is affected.

The sandbox now checks the input of tests like the input of filters. The built-in tests that never convert their input to a string still skip the check.

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.31.1

References

Timeline

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

Related CVEs from 2026

CVE-2026-1337655.3The sandbox checks that a template may call toString() on an object before converting it to a string. Since Twig 3.23.0, assignments like x CVE-2026-1337662.3Since 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 arguCVE-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 ha
CVE-2026-133764: Low severity, CVSS 2.3 | Vulnix