Skip to main content
VulnerabilityPublished Updated

CVE-2026-46633: Twig · PHP code injection via `{% use %}` template name

Affects twig/twigSource GCVE Database

0
Compare
Authoritative record:CVE-2026-46633· High 8.7

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

Data as of 4 Nov 2026, 04:46 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
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 3 Nov 2026.

What to do

Upgrade twig/twig to 3.26.0.

Affected software

ProductAffectedFixed in
Packagisttwig/twigAffected
  • >=1.15.1 <3.26.0
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

A patch is available in Twig version 3.26.0 that fixes the vulnerability by properly escaping single quotes in template names. Users should upgrade to version 3.26.0 or later to remediate this issue. No other mitigations are indicated or required.

Description

A critical PHP code injection vulnerability exists in Twig versions >=1.15.1 and <3.26.0 via the `{% use %}` template tag. The issue arises because single quotes in template names are not escaped properly, allowing injection of arbitrary PHP code into compiled cache files. This code executes with the PHP process, bypassing Twig's sandbox and enabling remote code execution. The vulnerability is fixed in version 3.26.0 by escaping single quotes in template names.

References

Community reviews

Loading reviews…