CVE-2026-46633 — Vulnerability in twig/twig — CVE Details
Twig: PHP code injection via `{% use %}` template name
Summary
Advisory Timeline
- First published May 21, 2026 (144 days ago).
- Last revised September 10, 2026 — 111 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 (1)
Affects 1 ecosystem: packagist (1).
| Package | Ecosystem | Affected | Fixed In |
|---|---|---|---|
| twig/twig | packagist | 1.3.0, 1.4.0, 1.5.0, 1.5.1 (+238 more) | 3.26.0 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-94Code InjectionMITRE
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 9.8 score means for each attack dimension.
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
References
Frequently Asked Questions
- What is CVE-2026-46633?
- Twig: PHP code injection via `{% use %}` template name This vulnerability has been assigned a severity rating of CRITICAL (CVSS score: 9.8/10).
- How do I check if my project is affected by CVE-2026-46633?
- CVE-2026-46633 affects twig/twig. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-46633 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Exploitation is straightforward and causes maximum impact. Patch immediately.
Also Known As
Related CVEs
- CVE-2026-107845CRITICAL
Contao: Cross-site scripting in the comments bundle
- CVE-2026-92161CRITICAL
FriendsOfFlarum OAuth: Unauthenticated account takeover via unverified email trust in Discord OAuth provider
- 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-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