CVE-2026-46633: twigphp Twig · Code Injection
Affects twigphp TwigSource CVE Database V5
Not known to be exploited · CVSS 8.7 High : upgrade to 3.26.0 soon.
Data as of 26 Nov 2026, 14:59 UTC
Thin evidence
One scorer or none| CNA (GitHub_M) | CVSS 4.0 | 8.7 |
|---|
- EPSS
- 0.7% chance of exploitation in 30 days – higher than 52% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
- Patch
- Available – fixed in 3.26.0
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:NExploitation evidence
Disclosed: evidence found.
CVE published 14 Jul 2026
Detectable: no evidence on record.
No public nuclei template indexed
Weaponized: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 26 Nov 2026.
What to do
Upgrade Twig and twig/twig to 3.26.0.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| twigphpTwig | Affected
| Fixed in
|
Packagisttwig/twigpkg:composer/twig/twigOther threats | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
Upgrade Twig to version 3.26.0 or later, where this vulnerability is fixed. Since this is a code injection vulnerability in the template compilation process, applying the official fix is critical to prevent exploitation.
Description
Twig is a template language for PHP. Starting in 1.15.1 and prior to 3.26.0, Compiler::string() does not escape single quotes when a template name from a {% use %} tag is placed inside a PHP single-quoted string literal, allowing a crafted template name to terminate the string and inject arbitrary PHP expressions into the compiled cache file. This issue is fixed in version 3.26.0.
References
- github.com/twigphp/Twig/security/advisories/GHSA-7p85-w9px-jpjp (opens in a new tab)
- github.com/twigphp/Twig/commit/679447fa29083043665482ccf7d64372472621b8 (opens in a new tab)
- github.com/twigphp/Twig/commit/e9ff55f6910832428e48a35b2e0748189ad49ae3 (opens in a new tab)
- github.com/twigphp/Twig/releases/tag/v3.26.0 (opens in a new tab)
- github.com/twigphp/Twig/commit/a2c6db7ea7d2c90923e6708019ec1442526d1c30 (opens in a new tab)
- gist.github.com/vladko312/d61b950f168c791db4786b83dc7a81e6 (opens in a new tab)
- github.com/FriendsOfPHP/security-advisories/blob/master/twig/twig/CVE-2026-46633.yaml (opens in a new tab)
- symfony.com/cve-2026-46633 (opens in a new tab)