CVE-2019-6339: Drupal/drupal Arbitrary PHP Code Execution Vulnerability
CRITICALCVE-2019-6339 is a CRITICAL (CVSS 9.8) arbitrary php code execution vulnerability (CWE-20: Improper Input Validation) affecting Drupal/drupal libraries in the Packagist ecosystem. The issue involves arbitrary php code execution in drupal. Remediation is available by upgrading affected packages to version 7.62.0, 8.5.9, 8.6.6.
CVE-2019-6339 at a Glance
Security Impact
CVSS: 9.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).
How to Fix CVE-2019-6339
To remediate this vulnerability, upgrade all affected Drupal/drupal dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade drupal/drupal to 7.62.0
Upgrade drupal/drupal to 8.5.9
Upgrade drupal/drupal to 8.6.6
Upgrade drupal/core to 7.62.0
Upgrade drupal/core to 8.5.9
Upgrade drupal/core to 8.6.6
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for drupal/drupal
How to Check if You Are Affected
To determine whether your application is affected by CVE-2019-6339, inspect your project dependencies for Drupal/drupal:
inspect dependencies for drupal/drupal
Analyze the terminal output to locate any version of Drupal/drupal in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 7.62.0), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-20: Improper Input Validation, where the product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly. In Drupal/drupal, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2019-6339 Affected Drupal/drupal Versions
6 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
drupal/drupal
|
Packagist |
≥ 7.0.0
< 7.62.0
|
7.62.0
|
|
drupal/drupal
|
Packagist |
≥ 8.0.0
< 8.5.9
|
8.5.9
|
|
drupal/drupal
|
Packagist |
≥ 8.6.0
< 8.6.6
|
8.6.6
|
|
drupal/core
|
Packagist |
≥ 7.0.0
< 7.62.0
|
7.62.0
|
|
drupal/core
|
Packagist |
≥ 8.0.0
< 8.5.9
|
8.5.9
|
|
drupal/core
|
Packagist |
≥ 8.6.0
< 8.6.6
|
8.6.6
|
References
Frequently Asked Questions
What is CVE-2019-6339?
Which Drupal/drupal versions are affected?
What version fixes CVE-2019-6339?
Is drupal/drupal affected?
Is drupal/core affected?
What is the CVSS score of CVE-2019-6339?
What CWE is associated with CVE-2019-6339?
How can I check Packagist dependencies for CVE-2019-6339?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-8cw5-rv98-5c46",
"modified" : "2022-01-06T19:00:47Z",
"published" : "2022-01-06T22:30:06Z",
"aliases" : [ "CVE-2019-6339" ],
"summary" : "Arbitrary PHP code execution in Drupal",
"details" : "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\nPHP'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.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "drupal/drupal"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "7.0.0"
}, {
"fixed" : "7.62.0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "drupal/drupal"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "8.0.0"
}, {
"fixed" : "8.5.9"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "drupal/drupal"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "8.6.0"
}, {
"fixed" : "8.6.6"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "drupal/core"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "7.0.0"
}, {
"fixed" : "7.62.0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "drupal/core"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "8.0.0"
}, {
"fixed" : "8.5.9"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "drupal/core"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "8.6.0"
}, {
"fixed" : "8.6.6"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2019-6339"
}, {
"type" : "WEB",
"url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/drupal/core/CVE-2019-6339.yaml"
}, {
"type" : "WEB",
"url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/drupal/drupal/CVE-2019-6339.yaml"
}, {
"type" : "WEB",
"url" : "https://lists.debian.org/debian-lts-announce/2019/02/msg00004.html"
}, {
"type" : "WEB",
"url" : "https://www.debian.org/security/2019/dsa-4370"
}, {
"type" : "WEB",
"url" : "https://www.drupal.org/sa-core-2019-002"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-20" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2022-01-06T19:00:47Z",
"nvd_published_at" : null
}
}