CVE-2018-7602 — core
CRITICALCVE-2018-7602 is a critical-severity (CVSS 9.8) Code Injection vulnerability in drupal/core. It is in CISA's Known Exploited Vulnerabilities catalog (added 2022-04-13) and has been used in ransomware campaigns — treat it as actively exploited and patch now. A fix is available for drupal/core — see the affected versions and patch details below.
Drupal Core Remote Code Execution Vulnerability
Exploitation Status
Actively exploited in the wild
- Confirmed by CISA's Known Exploited Vulnerabilities catalog on 2022-04-13 — including use in ransomware campaigns. Federal agencies were required to remediate by 2022-05-04.
- A successful exploit gives an attacker total control of the affected component, not partial access.
Exploitation and automatability from CISA (KEV catalog and SSVC triage) for CVE-2018-7602.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
CVE-2018-7602 by exploitation likelihood (EPSS) against impact (CVSS). In the shaded patch-first corner (EPSS 50%+, CVSS 7.0+).
Where this sits among everything scored
Of 394,415 CVEs with a current EPSS score, this one falls in the ≥ 90% band (highlighted). Counts from FIRST.org, log-scaled.
Real-World Exposure
drupal/core🐘drupal/core🐘drupal/core🐘drupal/drupal🐘drupal/drupal🐘drupal/drupalReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Packagist packages — download data is not available via public APIs for these ecosystems.
Description
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.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐘Packagist | drupal/core | ≥ 7.0&&< 7.59 | 7.59composer require drupal/core:^7.59 |
| 🐘Packagist | drupal/core | ≥ 8.0&&< 8.4.8 | 8.4.8composer require drupal/core:^8.4.8 |
| 🐘Packagist | drupal/core | ≥ 8.5&&< 8.5.3 | 8.5.3composer require drupal/core:^8.5.3 |
| 🐘Packagist | drupal/drupal | ≥ 7.0&&< 7.59 | 7.59composer require drupal/drupal:^7.59 |
| 🐘Packagist | drupal/drupal | ≥ 8.0&&< 8.4.8 | 8.4.8composer require drupal/drupal:^8.4.8 |
| 🐘Packagist | drupal/drupal | ≥ 8.5&&< 8.5.3 | 8.5.3composer require drupal/drupal:^8.5.3 |
Affected Products
debian linuxdebiandrupaldrupalResearch use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.
Drupal < 7.58 - 'Drupalgeddon3' (Authenticated) Remote Code (Metasploit)
by SixP4ck3r · Apr 30, 2018
Drupal < 7.58 - 'Drupalgeddon3' (Authenticated) Remote Code Execution (PoC)
by Blaklis · Apr 25, 2018
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for drupal/core, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update drupal/core to 7.59 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2018-7602 is resolved across your whole dependency graph.
Workarounds
Stop passing untrusted input into the interpreter or shell: call the affected binary with an argument array rather than a composed command string, reject anything outside a strict allowlist of expected values, and run the component under an account that cannot reach beyond the work it legitimately does.
How to detect CVE-2018-7602
A community-maintained Nuclei template exists for this CVE. You can scan for it directly:
nuclei -id cve-2018-7602 -u https://target- Template
- Drupal - Remote Code Execution
- Severity
- critical
- Impact
- Remote attackers can execute arbitrary code on the affected Drupal installations.
- Remediation
- Upgrade to Drupal 7.58, 8.3.9, 8.4.6, or 8.5.1 or apply the necessary patches provided by Drupal.
Template by ProjectDiscovery nuclei-templates (princechaddha), MIT licensed. View the full template. Scan only systems you are authorised to test.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
Frequently Asked Questions
Is CVE-2018-7602 in your dependencies?
Find it across Packagist, including transitive dependencies.