Arbitrary Code Injection Affecting php-twig package, versions <3.5.1-1+deb12u3


Severity

Recommended
0.0
critical
0
10

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

Threat Intelligence

Social Trends
EPSS
0.69% (50th 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-DEBIAN12-PHPTWIG-16896343
  • published27 May 2026
  • disclosed14 Jul 2026

Introduced: 27 May 2026

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

How to fix?

Upgrade Debian:12 php-twig to version 3.5.1-1+deb12u3 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:12 relevant fixed versions and status.

Twig is a template language for PHP. 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.

CVSS Base Scores

version 3.1