Paper/Archive/CVE-2026-24425

CVE-2026-24425

twigphp Twig — Twig 2.16.x & 3.9.0-3.25.x Sandbox Bypass via SourcePolicyInterface

Description · from the CVE record

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.

Affected

ProductAffectedFixed inSource
Twig3.9.0 – < 3.26.03.26.0CNA
Twig2.16.*–CNA

Scores by source

NVD9.9CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
VulnCheck (CNA)8.8CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
VulnCheck (CNA)8.7CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
CISA ADPSSVCExploitation: none · Automatable: no · Technical impact: total

References

advisorygithub.com/twigphp/Twig/security/advisories/GHSA-2q52-x2ff-qgfrrefgithub.com/twigphp/Twig/releases/tag/v3.26.0writeupvulncheck.com/advisories/twig-x-x-sandbox-bypass-via-sourcepolicyinterface