CVE-2022-39261: Twig may load a template outside a configured directory when using the filesystem loader

CVE-2022-39261 · Severity: low · CVSS 3.1 · Published 2022-09-30

Twig may load a template outside a configured directory when using the filesystem loader

Technologies: drupal/core (Packagist), twig/twig (Packagist). Vendors: Packagist.

Quick answers

Is CVE-2022-39261 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2022-39261 being exploited in the wild.
How severe is CVE-2022-39261?
Low severity, with a CVSS score of 3.1, published 30 September 2022.
Which products and versions are affected?
drupal/core (Packagist) ECOSYSTEM:introduced=8.0.0,fixed=9.3.22|ECOSYSTEM:introduced=9.4.0,fixed=9.4.7; twig/twig (Packagist) ECOSYSTEM:introduced=1.0.0,fixed=1.44.7.
Is there a fix for CVE-2022-39261?
Yes. drupal/core (Packagist): upgrade to 9.3.22 or later; twig/twig (Packagist): upgrade to 1.44.7 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
Am I affected by CVE-2022-39261?
Check whether you run drupal/core (Packagist) or twig/twig (Packagist) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • drupal/core (Packagist): upgrade to 9.3.22 or later
    composer require drupal/core:^9.3.22
  • twig/twig (Packagist): upgrade to 1.44.7 or later
    composer require twig/twig:^1.44.7

Affected products

  • drupal/core (Packagist) ECOSYSTEM:introduced=8.0.0,fixed=9.3.22|ECOSYSTEM:introduced=9.4.0,fixed=9.4.7
  • twig/twig (Packagist) ECOSYSTEM:introduced=1.0.0,fixed=1.44.7

Identifiers

  • CVE-2022-39261
  • DRUPAL-CORE-2022-016
  • GHSA-52m2-vc4m-jj33

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.