CVE-2017-6381 Drupal Remote code execution

High 8.1 Published Updated

Remote code execution possible in Drupal via vulnerable PHPUnit dependency if development files are exposed in production.

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

What is CVE-2017-6381?

CVE-2017-6381 is a high-severity code injection vulnerability in Drupal Drupal, published on 16 Mar 2017. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

A 3rd party development library including with Drupal 8 development dependencies is vulnerable to remote code execution. This is mitigated by the default .htaccess protection against PHP execution, and the fact that Composer development dependencies aren't normal installed. You might be vulnerable to this if you are running a version of Drupal before 8.2.2. To be sure you aren't vulnerable, you can remove the <siteroot>/vendor/phpunit directory from your production deployments

Weakness: CWE-829

Which versions are affected by CVE-2017-6381?

4 open source packages ship an affected version, including drupal/core and drupal/drupal. It affects 1 product.

PackageAffectedFixed in
drupal/core PackagistFrom 8.08.2.7
drupal/core PackagistFrom 8.08.2.7
drupal/drupal PackagistFrom 8.08.2.7
drupal/drupal PackagistFrom 8.08.2.7

Products include Drupal Drupal.

How do I fix CVE-2017-6381?

Upgrade drupal/core to 8.2.7 or later.

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

Is CVE-2017-6381 being exploited?

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

All Drupal Drupal vulnerabilities

Sources

Also known as GHSA-rhx9-3qf7-r3j7, UBUNTU-CVE-2017-6381.

Is CVE-2017-6381 in your software?

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

Check your SBOMs for free