Machine-written summary
Summary written by Claude Haiku from the source advisory. Not reviewed by a person.
Twig, the PHP template engine, has a sandbox bypass in versions >=2.16.0 up to and including 2.16.1 and >=3.9.0 before 3.26.0. When the sandbox is enabled through a SourcePolicyInterface rather than globally, the sort, filter, map, and reduce filters can accept non-Closure callbacks that the sandbox should reject. An attacker who can supply templates that are sandboxed this way could pass arbitrary PHP callables to these filters. The source does not describe the exact impact beyond this. Upgrade to Twig 3.26.0 or later, where the fix propagates the template source to callback checks.
Not analysed yet
We haven’t published our analysis of this Advisory yet. Once a person has reviewed it, this page will say what’s vulnerable, what has to be true for your app to be affected, and how to check.
Severity and exploitation
| Score | Rating | CVSS | Vector | Source |
|---|---|---|---|---|
| 8.7 | High | 4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N | CNA (VulnCheck) |
- CISA KEV Not listed.
- EPSS 0.0076, the 55th percentile, on 9 Nov 2026: FIRST’s estimate of the chance of exploitation in the next 30 days.
Timeline
- 20 May 2026, 07:44 UTC Published by the maintainers as a GitHub repository advisory
- 20 May 2026, 13:45 UTC Confirmed by the CVE List
- 31 Oct 2026, 13:58 UTC First seen by agentprime
- 31 Oct 2026, 13:58 UTC Confirmed by OSV
Sources
- GitHub Advisory Database: GHSA-2q52-x2ff-qgfr
- OSV: GHSA-2q52-x2ff-qgfr
- github.com/twigphp/Twig/security/advisories/GHSA-2q52-x2ff-qgfr
- nvd.nist.gov/vuln/detail/CVE-2026-24425
- github.com/FriendsOfPHP/security-advisories/blob/master/twig/twig/CVE-2026-24425.yaml
- github.com/twigphp/Twig
- github.com/twigphp/Twig/releases/tag/v3.26.0
- symfony.com/cve-2026-24425
- www.vulncheck.com/advisories/twig-x-x-sandbox-bypass-via-sourcepolicyinterface