CVE-2019-6339 PHAR stream wrapper Arbitrary PHP code execution

Critical 9.8 Published Updated

Remote attackers can execute arbitrary PHP code via untrusted phar URIs in Drupal, requiring administrative permissions or atypical configurations.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2019-6339?

CVE-2019-6339 is a critical code injection vulnerability in Debian Debian Linux, published on 22 Jan 2019. An attacker can exploit it over the internet without logging in, with no action from the victim.

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

Weakness: CWE-20

Which versions are affected by CVE-2019-6339?

13 open source packages ship an affected version, including drupal/core and drupal/drupal. It affects 2 products.

PackageAffectedFixed in
drupal/core PackagistFrom 7.0.07.62.0
drupal/core PackagistFrom 7.0.07.62.0
drupal/core PackagistFrom 8.0.08.5.9, 8.6.6
drupal/core PackagistFrom 8.0.08.5.9
drupal/core PackagistFrom 8.0.08.5.9
drupal/core PackagistFrom 8.6.08.6.6
7 more packages
drupal/core PackagistFrom 8.6.08.6.6
drupal/drupal PackagistFrom 7.0.07.62.0
drupal/drupal PackagistFrom 7.0.07.62.0
drupal/drupal PackagistFrom 8.0.08.5.9
drupal/drupal PackagistFrom 8.0.08.5.9
drupal/drupal PackagistFrom 8.6.08.6.6
drupal/drupal PackagistFrom 8.6.08.6.6

Products include Debian Debian Linux, Drupal Drupal.

How do I fix CVE-2019-6339?

Upgrade drupal/core to a fixed version for your release line: 7.62.0, 8.5.9 or 8.6.6.

Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.

Is CVE-2019-6339 being exploited?

There is no known exploitation of CVE-2019-6339 in the wild and no public exploit code.

Public exploit code: 1 proofs of concept on GitHub.

All Debian Debian Linux vulnerabilities

Sources

Also known as DLA-1659-1, DRUPAL-CORE-2019-002, GHSA-8cw5-rv98-5c46, UBUNTU-CVE-2019-6339.

Is CVE-2019-6339 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free