CVE-2026-24425 json
Twig 2.16.x & 3.9.0-3.25.x Sandbox Bypass via SourcePolicyInterface
published 2026-05-20 5 mo ago modified 2026-11-08 24 h ago also EUVD-2026-31113 , GHSA-2q52-x2ff-qgfr
- cvss
- 8.8
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.8%
- EPSS 0.8% chance of exploitation in 30 days, percentile 55%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- packagist twig/twig 3.26.0
- twigphp Twig 3.26.0
- php-twig Debian 13 3.27.0-0+deb13u1
- php-twig Debian 14 3.26.0-1
debian advisories DEBIAN-CVE-2026-24425
- php-twig Ubuntu Pro 26.04 LTS 3.23.0-2ubuntu0.1~esm1
ubuntu advisories UBUNTU-CVE-2026-24425
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
CISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- total
- Assessed
- 5 mo ago
Exploit prediction
0.76% chance of exploitation in the next 30 days, higher than 55% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 4.0 | 8.7 | 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 | 3.1 | 8.8 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| GitHub | 3.1 | 8.8 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| CNA | 4.0 | 8.7 | 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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X |
| NVD | 3.1 | 9.9 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| packagist | twig/twig | >=2.16.0, <=2.16.1 >=3.9.0, <3.26.0 |
3.26.0 |
Affected products
- twigphp Twig
Classification
- Weakness
-
- CWE-693 Protection Mechanism Failure
References
-
github.com
/twigphp/Twig/security/advisories/GHSA-2q52-x2ff-qgfr
vendor-advisory, web
-
github.com
/twigphp/Twig/releases/tag/v3.26.0
release-notes, web, product
-
vulncheck.com
/advisories/twig-x-x-sandbox-bypass-via-sourcepolicyinterface
third-party-advisory, web
-
nvd.nist.gov
/vuln/detail/CVE-2026-24425
advisory
-
github.com
/FriendsOfPHP/security-advisories/blob/master/twig/twig/CVE-2026-24425.yaml
web
-
github.com
/twigphp/Twig
package
-
symfony.com
/cve-2026-24425
web
Sources
- CVE List CVE-2026-24425
- GitHub Advisory GHSA-2q52-x2ff-qgfr
- NVD CVE-2026-24425
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.