Security Experts:

Connect with us

Hi, what are you looking for?

SecurityWeekSecurityWeek

Vulnerabilities

Phar Vulnerabilities Patched in Drupal, TYPO3

Updates released this week for the Drupal and TYPO3 open source content management systems (CMSs) patch vulnerabilities related to how Phar archives are handled.

The Phar (PHP Archive) package format enables developers to place all the files of a PHP application inside a single archive.

Updates released this week for the Drupal and TYPO3 open source content management systems (CMSs) patch vulnerabilities related to how Phar archives are handled.

The Phar (PHP Archive) package format enables developers to place all the files of a PHP application inside a single archive.

While the Phar format is highly useful, researcher Sam Thomas showed last year that it can also be abused for insecure deserialization — via the Phar stream wrapper— and arbitrary code execution by disguising malicious Phar files as text or image files. Stream wrappers are used by PHP to implement complex file handling functionality.

The security hole was addressed by TYPO3 developers a month after disclosure by introducing a Phar stream wrapper interceptor designed to ensure that Phar archives actually have a .phar extension and check Phar file metadata for potentially insecure serialized objects.

However, researchers have since discovered that the protection provided by the Phar stream wrapper interceptor, which has been released as open source, can be bypassed. A total of three bypass methods have been identified: one disclosed in October 2018 and two made public this week.

This means malicious actors could still upload specially crafted Phar files and possibly execute arbitrary code.

TYPO3 developers said the vulnerabilities affect versions 2.0.0-2.1.0 and 3.0.0-3.1.0 of the stream wrapper package and they have been addressed with the release of versions 3.1.1 (for PHP 7.0 and later) and 2.1.1 (for PHP 5.3 and later).

One of the bypass methods, which involves a path traversal issue, has also been found to impact Drupal, which also uses the TYPO3 interceptor. Drupal developers have classified the flaw as “moderately critical,” with a NIST Common Misuse Scoring System score of 14 out of 25, and patched it with the release of versions 7.67, 8.6.16 and 8.7.1.

This is not the first time Drupal has released updates designed to prevent attacks involving Phar files. In January, developers announced that .phar had been added to the list of dangerous extensions, and that the Phar stream wrapper had been disabled by default for Drupal 7 websites using versions of PHP prior to 5.3.2 to eliminate the risks highlighted by Thomas and a member of the Drupal security team.

Related: Drupal RCE Flaw Exploited in Attacks Days After Patch

Related: Symfony, jQuery Vulnerabilities Patched in Drupal

Related: Critical Drupal Vulnerability Allows Remote Code Execution

Written By

Eduard Kovacs (@EduardKovacs) is a contributing editor at SecurityWeek. He worked as a high school IT teacher for two years before starting a career in journalism as Softpedia’s security news reporter. Eduard holds a bachelor’s degree in industrial informatics and a master’s degree in computer techniques applied in electrical engineering.

Click to comment

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 this webinar to learn best practices that organizations can use to improve both their resilience to new threats and their response times to incidents.

Register

Join this live webinar as we explore the potential security threats that can arise when third parties are granted access to a sensitive data or systems.

Register

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...

Application Security

Drupal released updates that resolve four vulnerabilities in Drupal core and three plugins.

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...

Vulnerabilities

Apple has released updates for macOS, iOS and Safari and they all include a WebKit patch for a zero-day vulnerability tracked as CVE-2023-23529.

Cloud Security

VMware vRealize Log Insight vulnerability allows an unauthenticated attacker to take full control of a target system.

Application Security

A CSRF vulnerability in the source control management (SCM) service Kudu could be exploited to achieve remote code execution in multiple Azure services.

IoT Security

Lexmark warns of a remote code execution (RCE) vulnerability impacting over 120 printer models, for which PoC code has been published.

Vulnerabilities

GoAnywhere MFT users warned about a zero-day remote code injection exploit that can be targeted directly from the internet