CVE-2026-24425 Details
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.
A sandbox bypass vulnerability has been identified in Twig versions 2.16.x and 3.9.0 prior to 3.26.0. This vulnerability arises when using a SourcePolicyInterface, allowing attackers with template rendering capabilities to exploit callback-accepting filters such as sort, filter, map, and reduce. The issue stems from a runtime check that fails to reference the current template source, enabling the bypass of sandbox restrictions and the execution of arbitrary code under certain conditions.
Users can upgrade to Twig version 3.26.0 to address this vulnerability.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed May 20, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/twigphp/Twig/releases/tag/v3.26.0 | [email protected] | ProductRelease Notes |
| https://github.com/twigphp/Twig/security/advisories/GHSA-2q52-x2ff-qgfr | [email protected] | Vendor Advisory |
| https://www.vulncheck.com/advisories/twig-x-x-sandbox-bypass-via-sourcepolicyinterface | [email protected] | Third Party Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-693 | Protection Mechanism Failure | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| symfony twig | >= 2.16.0, <= 2.16.1 >= 3.9.0, < 3.26.0 |
CPE
Remediation
| |
Change History
8 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Nov 17, 2026 | CVE Modified | [email protected] |
| Oct 8, 2026 | CVE Modified | [email protected] |
| Jul 23, 2026 | CVE Translated | [email protected] |
| Jul 14, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 2, 2026 | Initial Analysis | [email protected] |
| May 20, 2026 | New CVE Received | [email protected] |