# CVE-2026-24425: Twig 2.16.x & 3.9.0-3.25.x Sandbox Bypass via SourcePolicyInterface

- Severity: High 8.7 (CVSS:4.0, scored by VulnCheck) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.76%, higher than 56% of CVEs (2026-12-01)
- Published: 2026-05-20T13:45:02.413Z
- Modified: 2026-11-17T23:17:57.923Z
- Also known as: GHSA-2q52-x2ff-qgfr
- Weaknesses: CWE-693
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: VulnCheck

## Description

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.

(As written by CVE List.)

## Affected

- twigphp Twig: from 3.9.0 before 3.26.0; 2.16.0
- twig/twig (Packagist): from 2.16.0 up to 2.16.1; from 3.9.0 before 3.26.0
- symfony twig: from 2.16.0 up to 2.16.1; from 3.9.0 before 3.26.0

## Every score

- VulnCheck: CVSS:4.0 8.7 High `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`
- VulnCheck: CVSS:3.1 8.8 High `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- GitHub: CVSS:3.1 8.8 High `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- GitHub: CVSS:4.0 High `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`
- NVD: CVSS:3.1 9.9 Critical `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H`

## References

- <https://github.com/twigphp/Twig/security/advisories/GHSA-2q52-x2ff-qgfr> (vendor-advisory, web)
- <https://github.com/twigphp/Twig/releases/tag/v3.26.0> (product, release-notes, web)
- <https://www.vulncheck.com/advisories/twig-x-x-sandbox-bypass-via-sourcepolicyinterface> (third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-24425> (advisory)
- <https://github.com/FriendsOfPHP/security-advisories/blob/master/twig/twig/CVE-2026-24425.yaml> (web)
- <https://github.com/twigphp/Twig> (package)
- <https://symfony.com/cve-2026-24425> (web)

## Sources

- CVE List: [CVE-2026-24425](https://www.cve.org/CVERecord?id=CVE-2026-24425), CVE Terms of Use, modified 2026-11-17
- GitHub Advisory Database: [GHSA-2q52-x2ff-qgfr](https://github.com/advisories/GHSA-2q52-x2ff-qgfr), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2026-24425](https://nvd.nist.gov/vuln/detail/CVE-2026-24425), Public domain, modified 2026-11-17

---

Page: https://cve.day/CVE-2026-24425 · Whole record: https://cve.day/CVE-2026-24425.json · Rebuilt by cve.day 2026-11-25T22:59:22.047Z
