CVEfocus › CVE database › CVE-2026-133766

CVE-2026-133766Sandbox `__toString()` policy bypass via spread arguments

CVSS 2.3 LowEPSS 0.5% (higher than 38% of CVEs)Published 2026-11-24Updated 2026-11-24Assigner: Symfony

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.

CWE-693CWE-863

What to do

Debian, Ubuntu have not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

6Fix pending

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 26.10php-twigFix pendingUBUNTU-CVE-2026-133766
Ubuntu 26.04php-twigFix pendingUBUNTU-CVE-2026-133766
Ubuntu 24.04php-twigFix pendingUBUNTU-CVE-2026-133766
Ubuntu 22.04php-twigFix pendingUBUNTU-CVE-2026-133766
Ubuntu 20.04php-twigFix pendingUBUNTU-CVE-2026-133766
Debian 14php-twigFix pendingDEBIAN-CVE-2026-133766

What the vendor says

As published in the CVE record by Symfony, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

Vendor advisories:

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.