CVE-2024-45411 — Vulnerability in twig/twig — CVE Details
Twig has a possible sandbox bypass
Summary
Advisory Timeline
- First published September 9, 2024 (763 days ago).
- Last revised October 10, 2024 — 31 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
composer require "twig/twig:^1.44.8"
composer require "twig/twig:^3.14.0"
composer require "twig/twig:^3.11.1"
composer require "twig/twig:^2.16.1"
After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.
Affected Packages (4)
Affects 1 ecosystem: packagist (1).
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-693Protection Mechanism FailureMITRE
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 8.5 score means for each attack dimension.
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H
References
- https://github.com/twigphp/Twig/security/advisories/GHSA-6j75-5wfj-gh66WEB
- https://nvd.nist.gov/vuln/detail/CVE-2024-45411ADVISORY
- https://github.com/twigphp/Twig/commit/11f68e2aeb526bfaf638e30d4420d8a710f3f7c6WEB
- https://github.com/twigphp/Twig/commit/2102dd135986db79192d26fb5f5817a566e0a7deWEB
- https://github.com/twigphp/Twig/commit/41103dcdc2daab4c83cdd05b5b4fde5b7e41e635WEB
- https://github.com/twigphp/Twig/commit/7afa198603de49d147e90d18062e7b9addcf5233WEB
- https://github.com/FriendsOfPHP/security-advisories/blob/master/twig/twig/CVE-2024-45411.yamlWEB
- https://github.com/twigphp/TwigPACKAGE
- https://symfony.com/blog/twig-security-release-possible-sandbox-bypassWEB
Frequently Asked Questions
- What is CVE-2024-45411?
- Twig has a possible sandbox bypass This vulnerability has been assigned a severity rating of MEDIUM (CVSS score: 8.5/10).
- How do I check if my project is affected by CVE-2024-45411?
- CVE-2024-45411 affects twig/twig. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2024-45411 and 200,000+ other known vulnerabilities.
Severity & Exploitability
High exploitability or significant impact. Prioritize remediation within days.
Also Known As
Related CVEs
- CVE-2026-46633CRITICAL
Twig: PHP code injection via `{% use %}` template name
- CVE-2026-24425HIGH
Twig: Possible sandbox bypass when using a source policy
- CVE-2026-46640HIGH
Twig: Arbitrary PHP code execution via `_self.(<string>)` macro-reference compilation
- CVE-2026-46639HIGH
Twig: Sandbox property and method bypass via object-destructuring assignment
- CVE-2026-75592MEDIUM
Kirby: Access to image files outside of the site root via path traversal in the media handling
- CVE-2026-46638MEDIUM
Twig: `{% sandbox %}{% include %}` skips checkSecurity() on cached templates (incomplete fix for CVE-2024-45411)
- CVE-2026-88023MEDIUM
MongoDB: GridFS data disclosure and deletion via query-operator injection in file IDs
Check if you're affected
Scan your dependencies to see if this vulnerability affects your projects.
Scan Your Dependencies