CVE-2026-24425
Analyzed
Analyzed - Analysis Complete
Twig Sandbox Bypass via SourcePolicyInterface
Publication date: 2026-05-20
Last updated on: 2026-06-02
Assigner: VulnCheck
Description
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.
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| symfony | twig | From 2.16.0 (inc) to 2.16.1 (inc) |
| symfony | twig | From 3.9.0 (inc) to 3.26.0 (exc) |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-693 | The product does not use or incorrectly uses a protection mechanism that provides sufficient defense against directed attacks against the product. |