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.

Advertisement. Scroll to continue reading.

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

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.

Don’t miss this Live Attack demonstration to learn how hackers operate and gain the knowledge to strengthen your defenses.

Register

Join us as we share best practices for uncovering risks and determining next steps when vetting external resources, implementing solutions, and procuring post-installation support.

Register

People on the Move

Shanta Kohli has been named CMO at Sysdig.

Cloud security firm Sysdig has appointed Sergej Epp as CISO.

F5 has appointed John Maddison as Chief Product Marketing and Technology Alliances Officer.

More People On The Move

Expert Insights

Daily Briefing Newsletter

Subscribe to the SecurityWeek Email Briefing to stay informed on the latest cybersecurity news, threats, and expert insights. Unsubscribe at any time.