CVE-2026-46634 json
Twig: `template_from_string()` escapes a SourcePolicy-driven sandbox via synthesized template name
published 2026-05-21 5 mo ago modified 2026-10-24 15 d ago also GHSA-24x9-r6q4-q93w , EUVD-2026-44565
- cvss
- 9.8
- version 3.1, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.6%
- EPSS 0.6% chance of exploitation in 30 days, percentile 49%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- packagist twig/twig 3.26.0
- symfony twig 3.26.0
- php-twig Debian 13 3.27.0-0+deb13u1
- php-twig Debian 14 3.26.0-1
debian advisories DEBIAN-CVE-2026-46634
CISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- total
- Assessed
- 3 mo ago
Exploit prediction
0.62% chance of exploitation in the next 30 days, higher than 49% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 4.0 | 7.7 | CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N |
| CNA | 4.0 | 7.7 | CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X |
| NVD | 3.1 | 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| packagist | twig/twig | >=3.9.0, <3.26.0 |
3.26.0 |
Affected products
- twigphp Twig
Classification
- Weakness
-
- CWE-693 Protection Mechanism Failure
References
-
github.com
/twigphp/Twig/commit/1cde8f2b62463f85d47995fc25f8241cb409d915
patch
-
github.com
/twigphp/Twig/security/advisories/GHSA-24x9-r6q4-q93w
web, vendor-advisory
-
github.com
/twigphp/Twig/releases/tag/v3.26.0
release-notes
-
github.com
/FriendsOfPHP/security-advisories/blob/master/twig/twig/CVE-2026-46634.yaml
web
-
github.com
/twigphp/Twig
package
-
symfony.com
/cve-2026-46634
web
Sources
- CVE List CVE-2026-46634
- GitHub Advisory GHSA-24x9-r6q4-q93w
- NVD CVE-2026-46634
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.