CVE-2026-24425
Fixed in a distro release EPSS <1%CVSS 8.8
Twig versions 2.16.x and 3.9.0 through 3.25.x contain a sandbox bypass vulnerability when using a SourcePolicyInterface that allows attackers with template rendering capabilities to pass arbitrary PHP callables to sort, filter, map, and reduce filters. Attackers can exploit the runtime check that fails to use the current template source to bypass sandbox restrictions and execute arbitrary code when the sandbox is enabled through a source policy rather than globally.
Products: twigphp Twig
Fixed upstream
| Ecosystem | Package | Fixed in |
|---|---|---|
| Packagist | twig/twig | no fix |
| Packagist | twig/twig | 3.26.0 |
Distro releases
| Release | Package | Fixed in |
|---|---|---|
| Debian 13 | php-twig | 3.27.0-0+deb13u1 |
| Debian 14 | php-twig | 3.26.0-1 |
| Ubuntu 25.10 | php-twig | no fix |
| Ubuntu Pro 26.04 LTS | php-twig | 3.23.0-2ubuntu0.1~esm1 |