High severity · published Sep 9, 2024
CVE-2024-45411
Twig has a possible sandbox bypass
8.6
CVSS
0.8%
EPSS
No
On KEV
Description
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.
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:H/A:N
Attack vector
Network
Complexity
Low
Privileges
None
User interaction
None
Confidentiality
None
Integrity
High
Availability
None
Scope
Changed
Exploitation
Is it being used?
Exploit prediction (EPSS)0.8% · higher than 58% of CVEs
Exploited in the wildNo evidence yet
CISA KEVNot listed
Ransomware campaign useNot known
Affected products
Which versions
TW
Twig · twigphp
> 1.0.0, < 1.44.8; > 2.0.0, < 2.16.1; > 3.0.0, < 3.14.0 · source: vendor, NVD, CISA
References
NVD
https://nvd.nist.gov/vuln/detail/CVE-2024-45411
CVE.org
https://www.cve.org/CVERecord?id=CVE-2024-45411
Patch
https://github.com/twigphp/Twig/commit/11f68e2aeb526bfaf638e30d4420d8a710f3f7c6
Patch
https://github.com/twigphp/Twig/commit/2102dd135986db79192d26fb5f5817a566e0a7de
Patch
https://github.com/twigphp/Twig/commit/7afa198603de49d147e90d18062e7b9addcf5233
Vendor Advisory
https://github.com/twigphp/Twig/security/advisories/GHSA-6j75-5wfj-gh66
lists.debian.org
https://lists.debian.org/debian-lts-announce/2024/09/msg00031.html
More from Twig
9.9
CVE-2026-24425
Twig 2.16.x & 3.9.0-3.25.x Sandbox Bypass via SourcePolicyInterface
9.8
CVE-2026-46634
Twig: `template_from_string()` escapes a SourcePolicy-driven sandbox via synthesized template name
9.8
CVE-2026-46633
Twig: PHP code injection via `{% use %}` template name
9.1
CVE-2026-48807
Twig: Sandbox `__toString()` policy bypass via `Traversable` in `join` and `replace` filters
9.1
CVE-2026-48806
Twig: Sandbox `__toString()` policy bypass via dynamic mapping keys
