CVE-2022-39261

High

Description

Twig is a template language for PHP. Versions 1.x prior to 1.44.7, 2.x prior to 2.15.3, and 3.x prior to 3.4.3 encounter an issue when the filesystem loader loads templates for which the name is a user input. It is possible to use the `source` or `include` statement to read arbitrary files from outside the templates' directory when using a namespace like `@somewhere/../some.file`. In such a case, validation is bypassed. Versions 1.44.7, 2.15.3, and 3.4.3 contain a fix for validation of such template names. There are no known workarounds aside from upgrading.

SeverityHigh
CVSS7.5
Exploit probability—
ProductSymfony Twig
PublishedSep 28, 2022
First seenSep 28, 2022

How to fix

Affected products

ProductAffected versionsFixed in
symfony twig1.0.0 ≤ v < 1.44.7, 2.0.0 ≤ v < 2.15.3, 3.0.0 ≤ v < 3.4.31.44.7, 2.15.3, 3.4.3
drupal drupal8.0.0 ≤ v < 9.3.22, 9.4.0 ≤ v < 9.4.79.3.22, 9.4.7
fedoraproject fedora35, 36, 37—
debian debian_linux10.0, 11.0—
drupal/corePackagist8.0.0 ≤ v < 9.3.22, 9.4.0 ≤ v < 9.4.79.3.22, 9.4.7
twig/twigPackagist1.0.0 ≤ v < 1.44.7, 2.0.0 ≤ v < 2.15.3, 3.0.0 ≤ v < 3.4.31.44.7, 2.15.3, 3.4.3

Check your version

Choose the product and enter the version you run to see whether it falls in the affected range.

In the Intelligence 360 plan

Attack Surface Management

See the assets tied to your domains, the technologies they run and known vulnerabilities in one list.