CVE-2022-39261

Severity CVSS v4.0:
Pending analysis
Type:
CWE-22 Path Traversal
Publication date:
28/09/2022
Last modified:
07/11/2023

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.

Vulnerable products and versions

CPE From Up to
cpe:2.3:a:symfony:twig:*:*:*:*:*:*:*:* 1.0.0 (including) 1.44.7 (excluding)
cpe:2.3:a:symfony:twig:*:*:*:*:*:*:*:* 2.0.0 (including) 2.15.3 (excluding)
cpe:2.3:a:symfony:twig:*:*:*:*:*:*:*:* 3.0.0 (including) 3.4.3 (excluding)
cpe:2.3:a:drupal:drupal:*:*:*:*:*:*:*:* 8.0.0 (including) 9.3.22 (excluding)
cpe:2.3:a:drupal:drupal:*:*:*:*:*:*:*:* 9.4.0 (including) 9.4.7 (excluding)
cpe:2.3:o:fedoraproject:fedora:35:*:*:*:*:*:*:*
cpe:2.3:o:fedoraproject:fedora:36:*:*:*:*:*:*:*
cpe:2.3:o:fedoraproject:fedora:37:*:*:*:*:*:*:*
cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:*
cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:*