CVE-2024-45411Twig has a possible sandbox bypass
Twig is a template language for PHP. Under some circumstances, the sandbox security checks are not run which allows user-contributed templates to bypass the sandbox restrictions. This vulnerability is fixed in 1.44.8, 2.16.1, and 3.14.0.
What to do
Fixed builds are available from Debian, Packagist, Ubuntu: see the table below for the fixed version per release.
Ubuntu has not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 25.10 | php-twig | Not affected vulnerable_code_not_present | ||
| Ubuntu 24.04 | php-twig | Fixed | 3.8.0-2ubuntu1 | UBUNTU-CVE-2024-45411 |
| Ubuntu 22.04 | php-twig | Fix pending | 3.3.8-2ubuntu4+esm2 (Ubuntu Pro) | UBUNTU-CVE-2024-45411 |
| Ubuntu 20.04 | php-twig | Fix pending | UBUNTU-CVE-2024-45411 | |
| Ubuntu 18.04 | twig | Fix pending | UBUNTU-CVE-2024-45411 | |
| Ubuntu 16.04 | twig | Fix pending | UBUNTU-CVE-2024-45411 | |
| Debian 14 | php-twig | Fixed | 3.8.0-4 | DEBIAN-CVE-2024-45411 |
| Debian 13 | php-twig | Fixed | 3.8.0-4 | DEBIAN-CVE-2024-45411 |
| Debian 12 | php-twig | Fixed | 3.5.1-1+deb12u1 | DEBIAN-CVE-2024-45411 |
| Packagist library | twig/twig | Fixed | 3.11.1 | GHSA-6j75-5wfj-gh66 |
What the vendor says
As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- twigphp Twig: affected: > 1.0.0, < 1.44.8, > 2.0.0, < 2.16.1, > 3.0.0, < 3.14.0
References
- https://github.com/twigphp/Twig/security/advisories/GHSA-6j75-5wfj-gh66
- https://github.com/twigphp/Twig/commit/11f68e2aeb526bfaf638e30d4420d8a710f3f7c6
- https://github.com/twigphp/Twig/commit/2102dd135986db79192d26fb5f5817a566e0a7de
- https://github.com/twigphp/Twig/commit/7afa198603de49d147e90d18062e7b9addcf5233
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.