CVE-2018-7602: Drupal/core Remote Code Execution Vulnerability
CRITICALCVE-2018-7602 is a CRITICAL (CVSS 9.8) remote code execution vulnerability (CWE-94: Improper Control of Generation of Code ('Code Injection')) affecting Drupal/core libraries in the Packagist ecosystem. The issue involves drupal core remote code execution vulnerability. Remediation is available by upgrading affected packages to version 7.59, 8.4.8, 8.5.3.
CVE-2018-7602 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.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H/E:H).
How to Fix CVE-2018-7602
To remediate this vulnerability, upgrade all affected Drupal/core 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/core to 7.59
Upgrade drupal/core to 8.4.8
Upgrade drupal/core to 8.5.3
Upgrade drupal/drupal to 7.59
Upgrade drupal/drupal to 8.4.8
Upgrade drupal/drupal to 8.5.3
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for drupal/core
How to Check if You Are Affected
To determine whether your application is affected by CVE-2018-7602, inspect your project dependencies for Drupal/core:
inspect dependencies for drupal/core
Analyze the terminal output to locate any version of Drupal/core in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 7.59), 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-94: Improper Control of Generation of Code ('Code Injection'), where the product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment. In Drupal/core, 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-2018-7602 Affected Drupal/core Versions
6 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
drupal/core
|
Packagist |
≥ 7.0
< 7.59
|
7.59
|
|
drupal/core
|
Packagist |
≥ 8.0
< 8.4.8
|
8.4.8
|
|
drupal/core
|
Packagist |
≥ 8.5
< 8.5.3
|
8.5.3
|
|
drupal/drupal
|
Packagist |
≥ 7.0
< 7.59
|
7.59
|
|
drupal/drupal
|
Packagist |
≥ 8.0
< 8.4.8
|
8.4.8
|
|
drupal/drupal
|
Packagist |
≥ 8.5
< 8.5.3
|
8.5.3
|
References
Frequently Asked Questions
What is CVE-2018-7602?
Which Drupal/core versions are affected?
What version fixes CVE-2018-7602?
Is drupal/core affected?
Is drupal/drupal affected?
What is the CVSS score of CVE-2018-7602?
What CWE is associated with CVE-2018-7602?
How can I check Packagist dependencies for CVE-2018-7602?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-297x-j9pm-xjgg",
"modified" : "2025-10-22T17:37:59Z",
"published" : "2024-04-23T22:36:09Z",
"aliases" : [ "CVE-2018-7602" ],
"summary" : "Drupal Core Remote Code Execution Vulnerability",
"details" : "A remote code execution vulnerability exists within multiple subsystems of Drupal 7.x and 8.x. This potentially allows attackers to exploit multiple attack vectors on a Drupal site, which could result in the site being compromised. This vulnerability is related to Drupal core - Highly critical - Remote Code Execution - SA-CORE-2018-002. Both SA-CORE-2018-002 and this vulnerability are being exploited in the wild.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H/E:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "drupal/core"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "7.0"
}, {
"fixed" : "7.59"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "drupal/core"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "8.0"
}, {
"fixed" : "8.4.8"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "drupal/core"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "8.5"
}, {
"fixed" : "8.5.3"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "drupal/drupal"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "7.0"
}, {
"fixed" : "7.59"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "drupal/drupal"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "8.0"
}, {
"fixed" : "8.4.8"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "drupal/drupal"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "8.5"
}, {
"fixed" : "8.5.3"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2018-7602"
}, {
"type" : "WEB",
"url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/drupal/core/CVE-2018-7602.yaml"
}, {
"type" : "WEB",
"url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/drupal/drupal/CVE-2018-7602.yaml"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/drupal/core"
}, {
"type" : "WEB",
"url" : "https://lists.debian.org/debian-lts-announce/2018/04/msg00030.html"
}, {
"type" : "WEB",
"url" : "https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2018-7602"
}, {
"type" : "WEB",
"url" : "https://www.debian.org/security/2018/dsa-4180"
}, {
"type" : "WEB",
"url" : "https://www.drupal.org/sa-core-2018-004"
}, {
"type" : "WEB",
"url" : "https://www.exploit-db.com/exploits/44542"
}, {
"type" : "WEB",
"url" : "https://www.exploit-db.com/exploits/44557"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-94" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2024-04-23T22:36:09Z",
"nvd_published_at" : "2018-07-19T17:29:00Z"
}
}