CVE-2026-24425Symfony Twig
High 8.7
Follow: this CVE · Symfony · Symfony Twig We alert you by email or Slack (account required).
- Priority
- 52
- CVSS 4.0
- 8.7
- EPSS
- —
- Auth required
- Yes
- Published
- May 20, 2026
- Updated
- Nov 17, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-693
- SSVC (CISA)
- Exploitation: none · Automatable: no · Technical impact: total
- 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
What happens
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.
What to do
- Apply the vendor's security update for Twig.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| Packagist | twig/twig |
≥ 2.16.0 ≤ 2.16.1 |
no fixed version | — |
| Packagist | twig/twig |
≥ 3.9.0 < 3.26.0 |
3.26.0 |
composer require "twig/twig:^3.26.0" |
Per OSV / GitHub Advisories (GHSA-2q52-x2ff-qgfr). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| symfony | twig | ≥ 2.16.0 ≤ 2.16.1 |
| symfony | twig | ≥ 3.9.0 < 3.26.0 |
Official sources
References
Links published by the sources. Open them with care.
- github.com Product Release Notes
- github.com Vendor Advisory
- www.vulncheck.com Third Party Advisory