CVE-2026-46640: 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 27 Nov 2026, 22:51 UTC
- EPSS
- 0.6% chance of exploitation in 30 days – higher than 45% 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 28 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
This vulnerability is fixed in Twig version 3.26.0. Users should upgrade to version 3.26.0 or later to remediate this issue. No other official remediation or temporary fix is indicated. Patch status is confirmed by the vendor advisory stating the issue is fixed in 3.26.0.
Description
Twig, a PHP template language, has a code injection vulnerability (CWE-94) in versions from 3.15.0 up to but not including 3.26.0. The issue arises from improper validation of dynamic attribute syntax that allows attacker-controlled strings to be concatenated into MacroReferenceExpression names, resulting in raw PHP code execution at template load time. This vulnerability is rated high severity with a CVSS score of 8.7. The vulnerability is fixed in version 3.26.0.