Vulnerability Name:

CVE-2022-39261 (CCN-237448)

Assigned:2022-09-28
Published:2022-09-28
Updated:2022-11-21
Summary: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.
CVSS v3 Severity:7.5 High (CVSS v3.1 Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N)
6.5 Medium (Temporal CVSS v3.1 Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N/E:U/RL:O/RC:C)
Exploitability Metrics:Attack Vector (AV): Network
Attack Complexity (AC): Low
Privileges Required (PR): None
User Interaction (UI): None
Scope:Scope (S): Unchanged
Impact Metrics:Confidentiality (C): High
Integrity (I): None
Availibility (A): None
7.5 High (CCN CVSS v3.1 Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N)
6.5 Medium (CCN Temporal CVSS v3.1 Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N/E:U/RL:O/RC:C)
Exploitability Metrics:Attack Vector (AV): Network
Attack Complexity (AC): Low
Privileges Required (PR): None
User Interaction (UI): None
Scope:Scope (S): Unchanged
Impact Metrics:Confidentiality (C): High
Integrity (I): None
Availibility (A): None
CVSS v2 Severity:7.8 High (CCN CVSS v2 Vector: AV:N/AC:L/Au:N/C:C/I:N/A:N)
Exploitability Metrics:Access Vector (AV): Network
Access Complexity (AC): Low
Athentication (Au): None
Impact Metrics:Confidentiality (C): Complete
Integrity (I): None
Availibility (A): None
Vulnerability Type:CWE-22
Vulnerability Consequences:Obtain Information
References:Source: MITRE
Type: CNA
CVE-2022-39261

Source: XF
Type: UNKNOWN
twig-cve202239261-dir-traversal(237448)

Source: MISC
Type: Patch, Third Party Advisory
https://github.com/twigphp/Twig/commit/35f3035c5deb0041da7b84daf02dea074ddc7a0b

Source: CCN
Type: Twig GIT Repository
Possibility to load a template outside a configured directory when using the filesystem loader

Source: CONFIRM
Type: Third Party Advisory
https://github.com/twigphp/Twig/security/advisories/GHSA-52m2-vc4m-jj33

Source: MLIST
Type: Mailing List, Third Party Advisory
[debian-lts-announce] 20221011 [SECURITY] [DLA 3147-1] twig security update

Source: FEDORA
Type: Mailing List, Third Party Advisory
FEDORA-2022-d39b2a755b

Source: FEDORA
Type: Mailing List, Third Party Advisory
FEDORA-2022-4490a4772d

Source: FEDORA
Type: Mailing List, Third Party Advisory
FEDORA-2022-9d8ee4a6de

Source: FEDORA
Type: Mailing List, Third Party Advisory
FEDORA-2022-c6fe3ebd94

Source: FEDORA
Type: Mailing List, Third Party Advisory
FEDORA-2022-73b9fb7a77

Source: FEDORA
Type: Mailing List, Third Party Advisory
FEDORA-2022-1695454935

Source: DEBIAN
Type: Third Party Advisory
DSA-5248

Source: CCN
Type: SA-CORE-2022-016
Drupal core - Critical - Multiple vulnerabilities

Source: CONFIRM
Type: Patch, Third Party Advisory
https://www.drupal.org/sa-core-2022-016

Vulnerable Configuration:Configuration 1:
  • cpe:/a:symfony:twig:*:*:*:*:*:*:*:* (Version >= 3.0.0 and < 3.4.3)
  • OR cpe:/a:symfony:twig:*:*:*:*:*:*:*:* (Version >= 2.0.0 and < 2.15.3)
  • OR cpe:/a:symfony:twig:*:*:*:*:*:*:*:* (Version >= 1.0.0 and < 1.44.7)

  • Configuration 2:
  • cpe:/a:drupal:drupal:*:*:*:*:*:*:*:* (Version >= 9.4.0 and < 9.4.7)
  • OR cpe:/a:drupal:drupal:*:*:*:*:*:*:*:* (Version >= 8.0.0 and < 9.3.22)

  • Configuration 3:
  • cpe:/o:fedoraproject:fedora:35:*:*:*:*:*:*:*
  • OR cpe:/o:fedoraproject:fedora:36:*:*:*:*:*:*:*
  • OR cpe:/o:fedoraproject:fedora:37:*:*:*:*:*:*:*

  • Configuration 4:
  • cpe:/o:debian:debian_linux:10.0:*:*:*:*:*:*:*
  • OR cpe:/o:debian:debian_linux:11.0:*:*:*:*:*:*:*

  • Configuration CCN 1:
  • cpe:/a:symfony:twig:1.0.0:*:*:*:*:*:*:*
  • OR cpe:/a:symfony:twig:2.0.0:*:*:*:*:*:*:*
  • OR cpe:/a:symfony:twig:3.0.0:-:*:*:*:*:*:*
  • AND
  • cpe:/a:drupal:drupal:8.0:alpha2:*:*:*:*:*:*

  • * Denotes that component is vulnerable
    BACK
    symfony twig *
    symfony twig *
    symfony twig *
    drupal drupal *
    drupal drupal *
    fedoraproject fedora 35
    fedoraproject fedora 36
    fedoraproject fedora 37
    debian debian linux 10.0
    debian debian linux 11.0
    symfony twig 1.0.0
    symfony twig 2.0.0
    symfony twig 3.0.0 -
    drupal drupal 8.0 alpha2