Skip to main content
VulnerabilityPublished Updated

CVE-2026-46633: twigphp Twig · Code Injection

Affects twigphp TwigSource CVE Database V5

0
Compare

Not known to be exploited · CVSS 8.7 High : upgrade to 3.26.0 soon.

Data as of 26 Nov 2026, 14:59 UTC

CVSS 4.0 base score
8.7High
How severe the flaw is on the 0–10 CVSS scale.

Thin evidence

One scorer or none
CVSS scores by source
CNA (GitHub_M)CVSS 4.08.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:N

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 14 Jul 2026

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponized: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq 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

ProductAffectedFixed in
twigphpTwigAffected
  • >=1.15.1 <3.26.0
Fixed in
  • 3.26.0
Packagisttwig/twigpkg:composer/twig/twigOther threatsAffected
  • v1.15.1 – v3.25.0
  • >=1.15.1 <3.26.0
200 affected builds
Fixed in
  • 3.26.0

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

Community reviews

Loading reviews…