# CVE-2026-24425: php-twig: Twig versions 2.16.x and 3.9.0 through 3.25.x contain a sandbox bypass vulnerability when using a SourcePolicyInterfa...

CVE-2026-24425 is fixed in 9 products on 1 platform, first by php-twig 3.23.0-2ubuntu0.1~esm1, released May 20, 2026. It is not reported as exploited. Patch Radar priority: Urgent.

- Web page: https://patchblox.com/security/cve/CVE-2026-24425
- Priority: Urgent
- CVSS: 9.9 (critical)
- EPSS: 0.0076
- CISA KEV: not listed
- Exploited (vendor report): no
- Publicly disclosed: no
- Published: May 20, 2026

## 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.

## Where it's fixed

| Platform | Product | Fixed in | Fix | Released |
|---|---|---|---|---|
| Linux | php-twig Debian 13.5 (trixie) | 3.27.0-0+deb13u1 | [DEBIAN-CVE-2026-24425](https://patchblox.com/security/data/fix/linux/debian-cve-2026-24425.md) | May 27, 2026 |
| Linux | php-twig Debian 14 | 3.26.0-1 | [DEBIAN-CVE-2026-24425](https://patchblox.com/security/data/fix/linux/debian-cve-2026-24425.md) | May 27, 2026 |
| Linux | php-twig Ubuntu 26.04.1 LTS (resolute) | 3.23.0-2ubuntu0.1~esm1 | [php-twig 3.23.0-2ubuntu0.1~esm1](https://patchblox.com/security/data/fix/linux/ubuntu-resolute-php-twig-3.23.0-2ubuntu0.1-esm1.md) | May 20, 2026 |
| Linux | php-twig-cache-extra Ubuntu 26.04.1 LTS (resolute) | 3.23.0-2ubuntu0.1~esm1 | [php-twig-cache-extra 3.23.0-2ubuntu0.1~esm1](https://patchblox.com/security/data/fix/linux/ubuntu-resolute-php-twig-cache-extra-3.23.0-2ubuntu0.1-esm1.md) | May 20, 2026 |
| Linux | php-twig-cssinliner-extra Ubuntu 26.04.1 LTS (resolute) | 3.23.0-2ubuntu0.1~esm1 | [php-twig-cssinliner-extra 3.23.0-2ubuntu0.1~esm1](https://patchblox.com/security/data/fix/linux/ubuntu-resolute-php-twig-cssinliner-extra-3.23.0-2ubuntu0.1-esm1.md) | May 20, 2026 |
| Linux | php-twig-extra-bundle Ubuntu 26.04.1 LTS (resolute) | 3.23.0-2ubuntu0.1~esm1 | [php-twig-extra-bundle 3.23.0-2ubuntu0.1~esm1](https://patchblox.com/security/data/fix/linux/ubuntu-resolute-php-twig-extra-bundle-3.23.0-2ubuntu0.1-esm1.md) | May 20, 2026 |
| Linux | php-twig-html-extra Ubuntu 26.04.1 LTS (resolute) | 3.23.0-2ubuntu0.1~esm1 | [php-twig-html-extra 3.23.0-2ubuntu0.1~esm1](https://patchblox.com/security/data/fix/linux/ubuntu-resolute-php-twig-html-extra-3.23.0-2ubuntu0.1-esm1.md) | May 20, 2026 |
| Linux | php-twig-inky-extra Ubuntu 26.04.1 LTS (resolute) | 3.23.0-2ubuntu0.1~esm1 | [php-twig-inky-extra 3.23.0-2ubuntu0.1~esm1](https://patchblox.com/security/data/fix/linux/ubuntu-resolute-php-twig-inky-extra-3.23.0-2ubuntu0.1-esm1.md) | May 20, 2026 |
| Linux | php-twig-intl-extra Ubuntu 26.04.1 LTS (resolute) | 3.23.0-2ubuntu0.1~esm1 | [php-twig-intl-extra 3.23.0-2ubuntu0.1~esm1](https://patchblox.com/security/data/fix/linux/ubuntu-resolute-php-twig-intl-extra-3.23.0-2ubuntu0.1-esm1.md) | May 20, 2026 |
| Linux | php-twig-markdown-extra Ubuntu 26.04.1 LTS (resolute) | 3.23.0-2ubuntu0.1~esm1 | [php-twig-markdown-extra 3.23.0-2ubuntu0.1~esm1](https://patchblox.com/security/data/fix/linux/ubuntu-resolute-php-twig-markdown-extra-3.23.0-2ubuntu0.1-esm1.md) | May 20, 2026 |
| Linux | php-twig-string-extra Ubuntu 26.04.1 LTS (resolute) | 3.23.0-2ubuntu0.1~esm1 | [php-twig-string-extra 3.23.0-2ubuntu0.1~esm1](https://patchblox.com/security/data/fix/linux/ubuntu-resolute-php-twig-string-extra-3.23.0-2ubuntu0.1-esm1.md) | May 20, 2026 |

---

Data as of 2026-11-08T19:12:23Z UTC. Source: Patchblox Patch Radar (https://patchblox.com/security/patch-radar). Patchblox finds out-of-date software on Windows, macOS and Linux and updates it through release rings: https://patchblox.com/demo

Free to use with attribution: show "Data: Patchblox Patch Radar" with a link to https://patchblox.com/security/patch-radar. Terms, including what needs a written agreement: https://patchblox.com/security/patch-radar/use-the-data

Product names, logos and trademarks shown on Patch Radar belong to their respective owners. They are used only to identify the software each security fix applies to and to help readers find their platform. Their use does not imply any affiliation with, or endorsement by, those owners, and Patchblox is not affiliated with any of them.
