Vulnerability in Symfony Twig
CVE-2026-24425
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.
Published · last modified .
CVSS v3 metric
CVSS v3 base score 8.8 (High). Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H.
EPSS exploit prediction
EPSS: 0.008 (53.4th percentile), scored .
Very low probability of exploitation in the next 30 days; routine patching cadence is appropriate. 53rd percentile — 53.4% of CVEs in the catalogue have a lower EPSS than this one. How to read EPSS.
EPSS over last 30 days · oldest: 0.008 · newest: 0.008 · change: 0.000
Affected products
- Symfony Twig
- Twigphp Twig — versions 3.9.0, 2.16.*
Weakness classification (CWE)
References
- github.com/twigphp/Twig/releases/tag/v3.26.0 (release-notes, Product, Release Notes)
- github.com/twigphp/Twig/security/advisories/GHSA-2q52-x2ff-qgfr (vendor-advisory, Vendor Advisory)
- www.vulncheck.com/advisories/twig-x-x-sandbox-bypass-via-sourcepolicyinterface (Third Party Advisory, third-party-advisory)
Frequently asked questions
- What is CVE-2026-24425?
- CVE-2026-24425 is a high-severity vulnerability in Symfony Twig, classified under Protection Mechanism Failure. CVSS score: 8.8/10. Published 2026-05-20.
- How severe is CVE-2026-24425?
- High severity. CVSS v3 base score is 8.8 out of 10.