Connect with us

Hi, what are you looking for?

SecurityWeekSecurityWeek

Vulnerabilities

Drupal Updates Patch Vulnerability in Twig Template Engine

Updates announced for Drupal this week address a severe vulnerability in Twig that could lead to the leakage of sensitive information.

Drupal is a PHP-based open source web content management system that has been using Twig as its default templating engine since Drupal 8, which was first released in November 2015.

Updates announced for Drupal this week address a severe vulnerability in Twig that could lead to the leakage of sensitive information.

Drupal is a PHP-based open source web content management system that has been using Twig as its default templating engine since Drupal 8, which was first released in November 2015.

Tracked as CVE-2022-39261, the vulnerability could allow an attacker to load templates outside a configured directory, via the filesystem loader.

“When using the filesystem loader to load 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),” Twig explains.

The vulnerability has been assigned a ‘high’ severity rating, or ‘critical’ based on the scoring system used by Drupal. Twig has addressed the flaw with the release of versions 1.44.7, 2.15.3, and 3.4.3.

“Multiple vulnerabilities are possible if an untrusted user has access to write Twig code, including potential unauthorized read access to private files, the contents of other files on the server, or database credentials,” Drupal notes in an advisory.

The security flaw is mitigated by the fact that an attacker requires a restricted access administrative permission to exploit the vulnerability. However, Drupal notes that contributed or custom code allowing users to write Twig templates may create additional exploit paths.

Drupal addressed the vulnerability with the release of Drupal 9.4.7 and Drupal 9.3.22. While end-of-life versions prior to Drupal 9.3 will not receive a patch, Drupal 7 core iterations are not affected, as they do not include Twig.

Advertisement. Scroll to continue reading.

This week, Drupal also announced a patch for the S3 File System, to resolve an access bypass issue. The module, which is meant to allow S3-compatible storage to be used as a Drupal filesystem, fails to “sufficiently prevent file access across multiple filesystem schemes stored in the same bucket”.

“This vulnerability is mitigated by the fact that an attacker must obtain a method to access arbitrary file paths, the site must have public or private takeover enabled, and the file metadata cache must be ignored,” Drupal notes.

Users who rely on the S3 File System module for Drupal 7.x are advised to update to version 7.x-2.14 of the module, which resolves the vulnerability.

Related: Drupal Updates Patch Another Vulnerability Related to Archive Files

Related: Access Bypass, Data Overwrite Vulnerabilities Patched in Drupal

Related: Code Execution and Other Vulnerabilities Patched in Drupal

Written By

Ionut Arghire is an international correspondent for SecurityWeek.

Click to comment

Trending

Daily Briefing Newsletter

Subscribe to the SecurityWeek Email Briefing to stay informed on the latest threats, trends, and technology, along with insightful columns from industry experts.

Join the session as we discuss the challenges and best practices for cybersecurity leaders managing cloud identities.

Register

SecurityWeek’s Ransomware Resilience and Recovery Summit helps businesses to plan, prepare, and recover from a ransomware incident.

Register

People on the Move

Attack detection firm Vectra AI has appointed Jeff Reed to the newly created role of Chief Product Officer.

Shaun Khalfan has joined payments giant PayPal as SVP, CISO.

UK cybersecurity agency NCSC announced Richard Horne as its new CEO.

More People On The Move

Expert Insights

Related Content

Vulnerabilities

Less than a week after announcing that it would suspended service indefinitely due to a conflict with an (at the time) unnamed security researcher...

Data Breaches

OpenAI has confirmed a ChatGPT data breach on the same day a security firm reported seeing the use of a component affected by an...

IoT Security

A group of seven security researchers have discovered numerous vulnerabilities in vehicles from 16 car makers, including bugs that allowed them to control car...

Vulnerabilities

A researcher at IOActive discovered that home security systems from SimpliSafe are plagued by a vulnerability that allows tech savvy burglars to remotely disable...

Risk Management

The supply chain threat is directly linked to attack surface management, but the supply chain must be known and understood before it can be...

Cybercrime

Patch Tuesday: Microsoft calls attention to a series of zero-day remote code execution attacks hitting its Office productivity suite.

Vulnerabilities

Patch Tuesday: Microsoft warns vulnerability (CVE-2023-23397) could lead to exploitation before an email is viewed in the Preview Pane.

IoT Security

A vulnerability affecting Dahua cameras and video recorders can be exploited by threat actors to modify a device’s system time.