# CVE-2018-7602: Drupal Core Remote Code Execution

> Attackers can execute arbitrary code remotely on Drupal sites via multiple subsystems, leading to full site compromise.

- **Severity:** High 8.1 (`CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Yes, since 13 Apr 2022 (CISA KEV), used in ransomware
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 19 Jul 2018
- **Updated:** 1 Oct 2026
- **Also known as:** CLEANSTART-2024-FK19349, DLA-1365-1, DRUPAL-CORE-2018-004, DSA-4180-1, GHSA-297x-j9pm-xjgg, UBUNTU-CVE-2018-7602

## What is CVE-2018-7602?

CVE-2018-7602 is a high-severity code injection vulnerability in Debian Debian Linux, published on 19 Jul 2018. An attacker can exploit it over the internet without logging in, with no action from the victim.

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

Weakness: CWE-94 (Improper Control of Generation of Code)

## Which versions are affected by CVE-2018-7602?

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


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `drupal/core` | Packagist | From 7.0 | 7.59 |
| `drupal/core` | Packagist | From 7.0 | 7.59 |
| `drupal/core` | Packagist | From 8.0 | 8.4.8 |
| `drupal/core` | Packagist | From 8.0 | 8.4.8 |
| `drupal/core` | Packagist | From 8.0.0 | 8.4.8, 8.5.3 |
| `drupal/core` | Packagist | From 8.5 | 8.5.3 |
| `drupal/core` | Packagist | From 8.5 | 8.5.3 |
| `drupal/drupal` | Packagist | From 7.0 | 7.59 |
| `drupal/drupal` | Packagist | From 7.0 | 7.59 |
| `drupal/drupal` | Packagist | From 8.0 | 8.4.8 |
| `drupal/drupal` | Packagist | From 8.0 | 8.4.8 |
| `drupal/drupal` | Packagist | From 8.5 | 8.5.3 |
| `drupal/drupal` | Packagist | From 8.5 | 8.5.3 |

Products: Debian Debian Linux, Drupal Drupal.

## How do I fix CVE-2018-7602?

Upgrade drupal/core to a fixed version for your release line: 7.59, 8.4.8 or 8.5.3. US federal agencies must fix it by 4 May 2022.

## Is CVE-2018-7602 being exploited?

Yes. Attackers have exploited CVE-2018-7602 in the wild since at least 13 Apr 2022, including in ransomware campaigns.

Public exploit code:

- POC to test/exploit drupal vulnerability SA-CORE-2018-004 / CVE-2018-7602 (github_poc): https://github.com/1337g/Drupalgedon3
- https://github.com/kastellanos/CVE-2018-7602 (github_poc): https://github.com/kastellanos/CVE-2018-7602
- https://github.com/cyberharsh/DrupalCVE-2018-7602 (github_poc): https://github.com/cyberharsh/DrupalCVE-2018-7602
- Drupal < 7.58 - 'Drupalgeddon3' (Authenticated) Remote Code Execution (PoC) (exploitdb)
- Drupal < 7.58 - 'Drupalgeddon3' (Authenticated) Remote Code (Metasploit) (exploitdb)
- Drupal < 7.58 - 'Drupalgeddon3' (Authenticated) Remote Code (Metasploit) (exploitdb)

## Other vulnerabilities in Debian Debian Linux

- [CVE-2015-3306](https://insights.sbomify.com/CVE-2015-3306/): ProFTPD Improper Access Control (critical 10.0, exploited in the wild)
- [CVE-2025-49113](https://insights.sbomify.com/CVE-2025-49113/): RoundCube Webmail Deserialization of Untrusted Data (critical 9.9, exploited in the wild)
- [CVE-2026-24061](https://insights.sbomify.com/CVE-2026-24061/): GNU InetUtils Argument Injection (critical 9.8, exploited in the wild)
- [CVE-2025-39682](https://insights.sbomify.com/CVE-2025-39682/): Linux Kernel Improper Check for Unusual or Exceptional Conditions (critical 9.8, exploited in the wild)
- [CVE-2024-9680](https://insights.sbomify.com/CVE-2024-9680/): Mozilla Firefox Use-After-Free (critical 9.8, exploited in the wild)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2018-7602 and fix it if it is affected.

What it is: CVE-2018-7602 is a high-severity code injection vulnerability in Debian Debian Linux, published on 19 Jul 2018. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: Yes. Attackers have exploited CVE-2018-7602 in the wild since at least 13 Apr 2022, including in ransomware campaigns.

Affected packages and fixed versions:
- drupal/core (Packagist): affected from 7.0; fixed in 7.59
- drupal/core (Packagist): affected from 7.0; fixed in 7.59
- drupal/core (Packagist): affected from 8.0; fixed in 8.4.8
- drupal/core (Packagist): affected from 8.0; fixed in 8.4.8
- drupal/core (Packagist): affected from 8.0.0; fixed in 8.4.8, 8.5.3
- drupal/core (Packagist): affected from 8.5; fixed in 8.5.3
- drupal/core (Packagist): affected from 8.5; fixed in 8.5.3
- drupal/drupal (Packagist): affected from 7.0; fixed in 7.59
- drupal/drupal (Packagist): affected from 7.0; fixed in 7.59
- drupal/drupal (Packagist): affected from 8.0; fixed in 8.4.8
- drupal/drupal (Packagist): affected from 8.0; fixed in 8.4.8
- drupal/drupal (Packagist): affected from 8.5; fixed in 8.5.3

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2018-7602/ (Markdown: https://insights.sbomify.com/CVE-2018-7602/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2018-7602
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2018-7602
- OSV: https://osv.dev/vulnerability/CVE-2018-7602

---
From sbomify Insights: https://insights.sbomify.com/CVE-2018-7602/
Summaries are generated and may contain mistakes; the official description above is the record.
