CVE-2026-46634: Twig - Template Injection
- Cve: CVE-2026-46634
- Name: Twig - Template Injection
- Description: Twig is a template language for PHP. From 3.9.0 until 3.26.0, template_from_string() compiles an inner template under a synthesized __string_template__<hash> name that can fall outside a SourcePolicyInterface sandbox decision, allowing a sandboxed template that can call template_from_string and include to render an inner template without security policy enforcement. This issue is fixed in version 3.26.0.
- Impact: Sandboxed attackers can bypass security policies to render unauthorized templates, potentially leading to unauthorized code execution or data exposure.
- Remediation: Update to version 3.26.0 or later.
- Vulnerability type: template_injection
- Vulnerability impact: remote_code_execution
- Requirement type: logged_in
- Requirements: Attacker needs to run sandboxed templates
- Labels source: projectdiscovery
- Severity: critical
- Cvss score: 9.8
- Cvss vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- Epss score: 0.00616
- Epss percentile: 0.5022
- Assignee: [email protected]
- Published at: 2026-07-14T22:16:56Z
- Age in days: 133
- Modified at: 2026-10-24T22:10:00Z
- Patch available: yes
- References total: 3
- Products total: 1
- Oss: yes
- Projects total: 1
- Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2026-46634
- Nvd status: analyzed
- Checked, none or zero: known exploited entries, nuclei templates, public exploits total, public exploits capped, public exploits, rejected by nvd
- Not known: hackerone
Cwe
| Id | Name |
|---|---|
| CWE-693 | Protection Mechanism Failure |
References
Same in every row:
- Source: nvd
Products
| Product | Affected | Platform bound | Sources | Url |
|---|---|---|---|---|
| symfony:twig | >= 3.9.0, < 3.26.0 | no | nvd | /v1/products/symfony/twig |
Projects
| Repository | Link kinds | Indexed | Url |
|---|---|---|---|
| twigphp/Twig | commit, fix, package, releases, security_advisory | yes | /v1/repositories/twigphp/Twig |
Index
- Repositories: 22
- Repositories high signal: 17
- Packages: 1
Exploitation
- Remote: yes
- Checked, none or zero: known exploited, known exploited by, exploitation seen, public exploit, public exploit count, initial access, authentication required
- Not known: known exploited since, vulncheck known exploited since, public exploit first date, nuclei template, initial access since, hackerone reports, exposed hosts