Arbitrary Code Injection Affecting php-twig package, versions <3.27.0-0+deb13u1


Severity

Recommended
0.0
high
0
10

Snyk's Security Team recommends NVD's CVSS assessment. Learn more

Threat Intelligence

EPSS
0.64% (49th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-DEBIAN13-PHPTWIG-16896265
  • published27 May 2026
  • disclosed14 Jul 2026

Introduced: 27 May 2026

CVE-2026-46640  (opens in a new tab)
CWE-94  (opens in a new tab)

How to fix?

Upgrade Debian:13 php-twig to version 3.27.0-0+deb13u1 or higher.

NVD Description

Note: Versions mentioned in the description apply only to the upstream php-twig package and not the php-twig package as distributed by Debian. See How to fix? for Debian:13 relevant fixed versions and status.

Twig is a template language for PHP. From 3.15.0 until 3.26.0, _self.(<string>) and import-alias dynamic attribute syntax can concatenate an attacker-controlled string into a MacroReferenceExpression name without identifier validation, causing raw PHP to be emitted into the generated template source and executed at template-load time. This issue is fixed in version 3.26.0.

CVSS Base Scores

version 3.1