Skip to content
OpenAdvisories
Critical · 9.8 Public exploit CVE-2019-6339 DRUPAL-CORE-2019-002EUVD-2022-0526GHSA-8cw5-rv98-5c46

PHAR stream wrapper Arbitrary PHP code execution

Published Jan 22, 2019 · Updated Sep 16, 2024 · Assigned by drupal

Description

In Drupal Core versions 7.x prior to 7.62, 8.6.x prior to 8.6.6 and 8.5.x prior to 8.5.9; A remote code execution vulnerability exists in PHP's built-in phar stream wrapper when performing file operations on an untrusted phar:// URI. Some Drupal code (core, contrib, and custom) may be performing file operations on insufficiently validated user input, thereby being exposed to this vulnerability. This vulnerability is mitigated by the fact that such code paths typically require access to an administrative permission or an atypical configuration.

Affected products

VendorProductAffectedFixed
Drupal Drupal core 7.x – < 7.62, 8.6.x – < 8.6.6., 8.5.x – < 8.5.9 7.62

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 9 drupal7 7.52-2+deb9u6 DSA-4370-1
Debian 8 drupal7 7.32-1+deb8u14 DLA-1659-1
ReleasePackageFixed inAdvisory
Ubuntu Pro 16.04 LTS drupal7 No fix yet —
Ubuntu Pro 14.04 LTS drupal7 No fix yet —

Public exploits

Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.

Third-party code, not reviewed by us. Public PoCs are sometimes fake or contain malware. Read the code first and run it only in an isolated lab, against systems you are authorised to test.

GitHub 1 repository

Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.

Affected packages

EcosystemPackageAffectedFixedRecord
Packagist drupal/core >= 8.0.0, < 8.5.9 · >= 8.6.0, < 8.6.6 8.5.9, 8.6.6 DRUPAL-CORE-2019-002
Packagist drupal/core >= 7.0.0, < 7.62.0 7.62.0 GHSA-8cw5-rv98-5c46
Packagist drupal/core >= 8.0.0, < 8.5.9 8.5.9 GHSA-8cw5-rv98-5c46
Packagist drupal/core >= 8.6.0, < 8.6.6 8.6.6 GHSA-8cw5-rv98-5c46
Packagist drupal/drupal >= 7.0.0, < 7.62.0 7.62.0 GHSA-8cw5-rv98-5c46
Packagist drupal/drupal >= 8.0.0, < 8.5.9 8.5.9 GHSA-8cw5-rv98-5c46
Packagist drupal/drupal >= 8.6.0, < 8.6.6 8.6.6 GHSA-8cw5-rv98-5c46

Advisories 2

References