CVE-2026-24425
Twig versions 2.16.x and 3.9.0 through 3.25.x contain a sandbox …
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.
What to do now
- Check your exposureFind out whether the affected software runs anywhere in your environment, including systems of suppliers.
- UpdateInstall the version in which the vendor fixed the vulnerability. The references lead to the advisory.
- Set the orderSystems that can be reached from the internet come first, then the rest.
References
- github.com/twigphp/Twig/releases/tag/v3.26.0
- github.com/twigphp/Twig/security/advisories/GHSA-2q52-x2ff-qgfr
- www.vulncheck.com/advisories/twig-x-x-sandbox-bypass-via-sourcepolicyinterface
- nvd.nist.gov/vuln/detail/CVE-2026-24425
- github.com/FriendsOfPHP/security-advisories/blob/master/twig/twig/CVE-2026-24425.yaml
- symfony.com/cve-2026-24425
- github.com/advisories/GHSA-2q52-x2ff-qgfr
- nvd.nist.gov/vuln/detail/CVE-2026-24425
- cve.org/CVERecord?id=CVE-2026-24425
Data: CVE list and the NVD. This product uses data from the NVD API but is not endorsed or certified by the NVD.