CVE-2026-24425 — Vulnerability in twig/twig — CVE Details
Twig: Possible sandbox bypass when using a source policy
Summary
Advisory Timeline
- First published June 5, 2026 (129 days ago).
- Last revised September 10, 2026 — 96 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
composer require "twig/twig:^3.26.0"
After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.
Affected Packages (2)
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.8 score means for each attack dimension.
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
References
- https://github.com/twigphp/Twig/security/advisories/GHSA-2q52-x2ff-qgfrWEB
- https://nvd.nist.gov/vuln/detail/CVE-2026-24425ADVISORY
- https://github.com/FriendsOfPHP/security-advisories/blob/master/twig/twig/CVE-2026-24425.yamlWEB
- https://github.com/twigphp/TwigPACKAGE
- https://github.com/twigphp/Twig/releases/tag/v3.26.0WEB
- https://symfony.com/cve-2026-24425WEB
- https://www.vulncheck.com/advisories/twig-x-x-sandbox-bypass-via-sourcepolicyinterfaceWEB
Frequently Asked Questions
- What is CVE-2026-24425?
- Twig: Possible sandbox bypass when using a source policy This vulnerability has been assigned a severity rating of HIGH (CVSS score: 8.8/10).
- How do I check if my project is affected by CVE-2026-24425?
- CVE-2026-24425 affects twig/twig. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-24425 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-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-65954HIGH
PHPCSUtils: Remote code execution via eval() in AbstractArrayDeclarationSniff::getActualArrayKey()
- CVE-2026-61825HIGH
code16/sharp has a stored XSS via data-html-content Sanitizer Bypass
- CVE-2024-45411MEDIUM
Twig has a possible sandbox bypass
- CVE-2026-46638MEDIUM
Twig: `{% sandbox %}{% include %}` skips checkSecurity() on cached templates (incomplete fix for CVE-2024-45411)
Check if you're affected
Scan your dependencies to see if this vulnerability affects your projects.
Scan Your Dependencies