CVE-2026-46639 Twig: Sandbox property and method bypass via object-destructuring assignment
HighCVSS 7.1
EPSS 0.39%
PoC
- Published
- Updated
- Exploit status
- Proof-of-concept only
- CISA SSVC
- No known exploitation · automatable: no · technical impact: partial
- Technology
- PHPUbuntuDebian
Description
Twig is a template language for PHP. From 3.24.0 until 3.26.0, object-destructuring assignment compiles CoreExtension::getAttribute() with the sandbox argument hardcoded to false, disabling property and method policy checks and allowing an attacker with write access to a sandboxed Twig template to read public properties or invoke public getters on objects passed to the template engine. This issue is fixed in version 3.26.0.
Upgrade path
8 packages: 3 fixed, 4 with no fix yet.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| ubuntu/php-twig(Ubuntu 22.04) | All versions | No fix listed | No fix yet |
| ubuntu/php-twig(Ubuntu 24.04) | All versions | No fix listed | No fix yet |
| ubuntu/php-twig(Ubuntu 26.04) | All versions | No fix listed | No fix yet |
| ubuntu/php-twig(Ubuntu 26.10) | All versions | No fix listed | No fix yet |
| debian/php-twig(Debian 14) | < 3.26.0-1; = 3.20.0-2; = 3.21.1-1; = 3.21.1-2 +11 more | 3.26.0-1 | Fixed |
| symfony twig | >= 3.24.0, < 3.26.0 | 3.26.0 | Fixed |
| twig/twig(Packagist) | = v3.24.0; = v3.25.0; >= 3.24.0, < 3.26.0 | 3.26.0 | Fixed |
| twigphp Twig | = >= 3.24.0, < 3.26.0 | No fix listed | Versions listed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| twig/twig(Packagist) | >= 3.24.0, < 3.26.0 | 3.26.0 |
| twig/twig(Packagist) | = v3.24.0 | No fix listed |
| twig/twig(Packagist) | = v3.25.0 | No fix listed |
| twigphp Twig | = >= 3.24.0, < 3.26.0 | No fix listed |
| debian/php-twig(Debian:14) | < 3.26.0-1 | 3.26.0-1 |
| debian/php-twig(Debian:14) | = 3.20.0-2 | No fix listed |
| debian/php-twig(Debian:14) | = 3.21.1-1 | No fix listed |
| debian/php-twig(Debian:14) | = 3.21.1-2 | No fix listed |
| debian/php-twig(Debian:14) | = 3.21.1-3 | No fix listed |
| debian/php-twig(Debian:14) | = 3.22.0-1 | No fix listed |
| debian/php-twig(Debian:14) | = 3.22.0-2 | No fix listed |
| debian/php-twig(Debian:14) | = 3.22.1-1 | No fix listed |
| debian/php-twig(Debian:14) | = 3.22.1-2 | No fix listed |
| debian/php-twig(Debian:14) | = 3.22.1-3 | No fix listed |
| debian/php-twig(Debian:14) | = 3.22.2-1 | No fix listed |
| debian/php-twig(Debian:14) | = 3.22.2-2 | No fix listed |
| debian/php-twig(Debian:14) | = 3.23.0-1 | No fix listed |
| debian/php-twig(Debian:14) | = 3.23.0-2 | No fix listed |
| debian/php-twig(Debian:14) | = 3.24.0-1 | No fix listed |
| ubuntu/php-twig(Ubuntu:22.04) | All versions | No fix listed |
| ubuntu/php-twig(Ubuntu:24.04) | All versions | No fix listed |
| ubuntu/php-twig(Ubuntu:26.04) | All versions | No fix listed |
| ubuntu/php-twig(Ubuntu:26.10) | All versions | No fix listed |
| symfony twig | >= 3.24.0, < 3.26.0 | 3.26.0 |
References
- https://github.com/twigphp/Twig/security/advisories/GHSA-mm6w-gr99-p3jj vendor-advisory
- github.com exploit
- github.com product
- symfony.com
- https://github.com/twigphp/Twig/releases/tag/v3.26.0 release-notes
- github.com
- Debian Security Tracker CVE-2026-46639 vendor-advisory
- Ubuntu CVE tracker vendor-advisory
- www.cve.org