# CVE-2019-6340: Drupal core - Highly critical - Remote Code Execution

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 8.1
- **CVSS:** 8.1 (v3.1, CNA) `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Network; Attack complexity: High; Privileges required: None; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Yes: in CISA KEV since 2022-03-25; federal due date 2022-04-15
- **Public exploit / PoC:** Yes (see exploit references)
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 92.02% (percentile 100, 2026-11-26)
- **CWE:** CWE-502
- **Aliases:** DRUPAL-CORE-2019-003, EDB-46452, EDB-46459, EDB-46510, GHSA-3gx6-h57h-rm27
- **Published:** 2019-02-20T19:18:48.000Z
- **Modified:** 2026-09-19T19:59:43.000Z

## Who should check

- Projects that depend on Packagist package drupal/core (\>= 8.0.0, \< 8.5.11; \>= 8.6.0, \< 8.6.10)
- Projects that depend on Packagist package drupal/drupal (\>= 7.0.0, \< 7.62.0)
- Anyone running Drupal Core \>= 8.5, \< 8.5.11; \>= 8.6, \< 8.6.10

## Description

Some field types do not properly sanitize data from non-form sources in Drupal 8.5.x before 8.5.11 and Drupal 8.6.x before 8.6.10. This can lead to arbitrary PHP code execution in some cases. A site is only affected by this if one of the following conditions is met: The site has the Drupal 8 core RESTful Web Services (rest) module enabled and allows PATCH or POST requests, or the site has another web services module enabled, like JSON:API in Drupal 8, or Services or RESTful Web Services in Drupal 7. (Note: The Drupal 7 Services module itself does not require an update at this time, but you should apply other contributed updates associated with this advisory if Services is in use.)

## Affected and fixed versions

- Packagist `drupal/core`: affected \>= 8.0.0, \< 8.5.11; \>= 8.6.0, \< 8.6.10; fixed 8.5.11, 8.6.10, 7.62.0 (osv)
- Packagist `drupal/drupal`: affected \>= 7.0.0, \< 7.62.0; fixed 7.62.0, 8.5.11, 8.6.10 (osv)
- Drupal Core: \>= 8.5, \< 8.5.11; \>= 8.6, \< 8.6.10 (cvelist)

## Mitigation

- Upgrade drupal/core to one of 8.5.11, 8.6.10, 7.62.0 (or later in the same release line).
- Upgrade drupal/drupal to one of 7.62.0, 8.5.11, 8.6.10 (or later in the same release line).

## Timeline

- 2019-02-20: Published
- 2022-03-25: Added to CISA KEV (exploited in the wild)
- 2022-04-15: CISA remediation due date for US federal agencies
- 2026-09-19: Last modified

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2019-6340. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2019-6340.md
Affected: drupal/core >= 8.0.0, < 8.5.11; >= 8.6.0, < 8.6.10; drupal/drupal >= 7.0.0, < 7.62.0
Fixed in: 8.5.11, 8.6.10, 7.62.0

Steps:
1. Search this machine and project for drupal/core (Packagist), drupal/drupal (Packagist), Drupal Core: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2019-6340 being exploited?

Yes. CISA lists CVE-2019-6340 in its Known Exploited Vulnerabilities catalog since 2022-03-25, which means attacks have been seen. Public exploit code or a proof of concept is available. EPSS estimates a 92.02% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2019-6340?

High: CVSS 8.1 (v3.1, scored by CNA). Remote, no login needed. The attack needs conditions outside the attacker's control, which makes it harder.

### Which versions are affected by CVE-2019-6340?

drupal/core \>= 8.0.0, \< 8.5.11; \>= 8.6.0, \< 8.6.10; drupal/drupal \>= 7.0.0, \< 7.62.0.

### Is there a fix for CVE-2019-6340?

Yes. Fixed in 8.5.11, 8.6.10, 7.62.0. Upgrade drupal/core to one of 8.5.11, 8.6.10, 7.62.0 (or later in the same release line). Upgrade drupal/drupal to one of 7.62.0, 8.5.11, 8.6.10 (or later in the same release line).

### How do I check if I'm affected by CVE-2019-6340?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://www.drupal.org/sa-core-2019-003>
- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2019-6340>
- exploit: <https://www.exploit-db.com/exploits/46452/>
- exploit: <https://www.exploit-db.com/exploits/46510/>
- exploit: <https://www.exploit-db.com/exploits/46459/>
- exploit: <https://www.exploit-db.com/exploits/46452>
- exploit: <https://www.exploit-db.com/exploits/46459>
- exploit: <https://www.exploit-db.com/exploits/46510>
- other: <https://www.synology.com/security/advisory/Synology_SA_19_09>
- other: <http://www.securityfocus.com/bid/107106>
- other: <https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2019-6340>
- other: <https://github.com/FriendsOfPHP/security-advisories/blob/master/drupal/core/CVE-2019-6340.yaml>
- other: <https://github.com/FriendsOfPHP/security-advisories/blob/master/drupal/drupal/CVE-2019-6340.yaml>
- other: <https://github.com/drupal/drupal>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2019-6340>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/DRUPAL-CORE-2019-003> (license: <https://creativecommons.org/licenses/by/4.0/>)
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-3gx6-h57h-rm27> (license: <https://creativecommons.org/licenses/by/4.0/>)
- Exploit-DB: Exploit metadata (ID and link only) from the Exploit Database <https://www.exploit-db.com/exploits/46510>
- CISA KEV: CISA Known Exploited Vulnerabilities Catalog <https://www.cisa.gov/known-exploited-vulnerabilities-catalog>

HTML: <https://flawdb.com/CVE-2019-6340> · JSON: <https://flawdb.com/api/v1/entries/CVE-2019-6340>
