Home / Advisories / CVE-2026-133765 CVE-2026-133765: CVE-2026-133765: Sandbox `__toString()` policy bypass via assignment and destructuring expressions unknown Affects twig/twig . Feed 2026.11.28.2, updated 2026-11-28; CVE published 2026.
CVE-2026-133765: Sandbox `__toString()` policy bypass via assignment and destructuring expressions Package twig/twig Composer Affected versions >=3.23.0 and <3.31.1Fixed in 3.31.1Severity unknown Exploitation not on CISA KEV · EPSS 1% (38.5th percentile) Source friendsofphp References Quick answers Is CVE-2026-133765 being actively exploited?
It is not on CISA's Known Exploited Vulnerabilities list today.
Which version fixes CVE-2026-133765?
twig/twig: 3.31.1.
How do I check whether I am affected?
Run `phpwarden deps composer.lock`. phpwarden checks the exact version you have installed against this advisory.
Am I affected? Find out in one command. phpwarden checks your composer.lock against this advisory and 21,000+ others, ranked by real-world exploitation (CISA KEV + EPSS). Free, offline, open data.
# PHP projects (recommended)
composer require --dev phpwarden/phpwarden
# then
vendor/bin/phpwarden deps composer.lock
# or, without Composer
pipx install phpwarden && phpwarden deps composer.lockOr keep it checked automatically: GitHub Action · pre-commit hook · GitLab CI · Laravel artisan command
Install docs How findings are ranked Related advisories CVE-2022-23614 high Code injection in Twig same package: twig/twig CVE-2022-39261 high Twig may load a template outside a configured directory when using the filesystem loader same package: twig/twig CVE-2015-7809 high Twig remote code execution in templates same package: twig/twig CVE-2019-9942 low Twig Sandbox Information Disclosure same package: twig/twig CVE-2024-45411 high Twig has a possible sandbox bypass same package: twig/twig CVE-2026-46633 critical Twig: PHP code injection via `{% use %}` template name same package: twig/twig