{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2026-24425","id":"CVE-2026-24425","title":"Twig 2.16.x & 3.9.0-3.25.x Sandbox Bypass via SourcePolicyInterface","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 whe","descriptionLong":"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":"2026-05-20T13:45:02.413Z","updated":"2026-11-18T19:45:54.574271412Z","reserved":"2026-01-22T20:23:19.801Z","status":"Analyzed","rejected":false,"assigner":"VulnCheck","metric":{"version":"4.0","score":8.7,"vector":"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","rating":"high","source":"VulnCheck"},"metrics":[{"version":"4.0","score":8.7,"vector":"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","rating":"high","source":"VulnCheck"},{"version":"4.0","score":8.7,"vector":"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","rating":"high","source":"vulncheck.com"},{"version":"4.0","score":null,"vector":"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","rating":"unrated","source":"OSV"},{"version":"4.0","score":null,"vector":"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","rating":"high","source":"GitHub"},{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"VulnCheck"},{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"vulncheck.com"},{"version":"3.1","score":9.9,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H","rating":"critical","source":"NVD"},{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"GitHub"}],"rating":"high","products":["twigphp Twig"],"affectedProducts":[{"vendor":"twigphp","product":"Twig","defaultStatus":"affected","versions":[{"status":"affected","version":"3.9.0","lessThan":"3.26.0","versionType":"semver"},{"status":"affected","version":"2.16.0","versionType":"custom"}],"platforms":[]}],"packages":[{"ecosystem":"Packagist","name":"twig/twig","purl":"pkg:composer/twig/twig","ranges":[">=2.16.0 <=2.16.1",">=3.9.0 <3.26.0"],"fixed":["3.26.0"],"advisory":"GHSA-2q52-x2ff-qgfr"}],"cwes":["CWE-693"],"aliases":["GHSA-2q52-x2ff-qgfr"],"references":[{"url":"https://github.com/twigphp/Twig/security/advisories/GHSA-2q52-x2ff-qgfr","tags":["vendor-advisory","Vendor Advisory","advisory","web"]},{"url":"https://github.com/twigphp/Twig/releases/tag/v3.26.0","tags":["release-notes","Product","Release Notes","advisory","web"]},{"url":"https://www.vulncheck.com/advisories/twig-x-x-sandbox-bypass-via-sourcepolicyinterface","tags":["third-party-advisory","Third Party Advisory","advisory","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/24xxx/CVE-2026-24425.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-24425","tags":["advisory"]},{"url":"https://github.com/twigphp/Twig","tags":["package"]},{"url":"https://github.com/FriendsOfPHP/security-advisories/blob/master/twig/twig/CVE-2026-24425.yaml","tags":["web"]},{"url":"https://symfony.com/cve-2026-24425","tags":["web"]}],"patchReferenced":false,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total"},"epss":0.00758,"epssPercentile":0.55994,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2026-24425","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-24425","ok":true,"note":"Analyzed"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2026-24425","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-2q52-x2ff-qgfr","ok":true,"note":"GHSA-2q52-x2ff-qgfr"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2026-24425","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}