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 products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| Drupal | Drupal Core | 8.5 – < 8.5.11, 8.6 – < 8.6.10 | 8.5.11 |
Public exploits
Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.
Metasploit 1 module
-
Drupal RESTful Web Services unserialize() RCE
exploit/unix/webapp/drupal_restws_unserialize
Exploit-DB 3
- Drupal < 8.5.11 / < 8.6.10 - RESTful Web Services unserialize() Remote Command Execution (Metasploit) EDB-46510 · remote · Mar 7, 2019 · verified
- Drupal < 8.6.9 - REST Module Remote Code Execution EDB-46459 · webapps · Feb 25, 2019
- Drupal < 8.6.10 / < 8.5.11 - REST Module Remote Code Execution EDB-46452 · webapps · Feb 23, 2019
GitHub 11 repositories · most starred shown
-
jas502n/CVE-2019-6340 ★ 71 · May 27, 2019
Drupal8's REST RCE, SA-CORE-2019-003, CVE-2019-6340
-
knqyf263/CVE-2019-6340 ★ 42 · Feb 23, 2019
Environment for CVE-2019-6340 (Drupal)
-
g0rx/Drupal-SA-CORE-2019-003 ★ 30 · Feb 22, 2019
CVE-2019-6340-Drupal SA-CORE-2019-003
-
oways/CVE-2019-6340 ★ 11 · Feb 25, 2019
CVE-2019-6340 POC Drupal rce
-
ludy-dev/drupal8-REST-RCE ★ 4 · Aug 31, 2020
(CVE-2019-6340, CVE-2018-7600) drupal8-REST-RCE
-
DevDungeon/CVE-2019-6340-Drupal-8.6.9-REST-Auth-Bypass ★ 2 · Feb 25, 2019
CVE-2019-6340 Drupal 8.6.9 REST Auth Bypass examples
-
Sumitpathania03/Drupal-cve-2019-6340 ★ 0 · Feb 22, 2023
-
nobodyatall648/CVE-2019-6340 ★ 0 · May 1, 2021
Drupal Drupal 8.6.x RCE Exploit
-
josehelps/cve-2019-6340-bits ★ 0 · Mar 12, 2019
Bits generated while analyzing CVE-2019-6340 Drupal RESTful RCE
-
cved-sources/cve-2019-6340 ★ 0 · Feb 26, 2019
cve-2019-6340
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
Automated scanner template
A ready-made Nuclei template detects this vulnerability automatically. Vulnerabilities with public scanner templates are typically probed across the internet soon after the template appears — exposed systems should be patched first.
- Drupal - Remote Code Execution http/cves/2019/CVE-2019-6340.yaml
Source: projectdiscovery/nuclei-templates (MIT) — updated daily. Only links are listed.
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| Packagist | drupal/core | >= 8.0.0, < 8.5.11 · >= 8.6.0, < 8.6.10 | 8.5.11, 8.6.10 | DRUPAL-CORE-2019-003 |
| Packagist | drupal/core | >= 8.6.0, < 8.6.10 | 8.6.10 | GHSA-3gx6-h57h-rm27 |
| Packagist | drupal/core | >= 7.0.0, < 7.62.0 | 7.62.0 | GHSA-3gx6-h57h-rm27 |
| Packagist | drupal/core | >= 8.0.0, < 8.5.11 | 8.5.11 | GHSA-3gx6-h57h-rm27 |
| Packagist | drupal/drupal | >= 7.0.0, < 7.62.0 | 7.62.0 | GHSA-3gx6-h57h-rm27 |
| Packagist | drupal/drupal | >= 8.0.0, < 8.5.11 | 8.5.11 | GHSA-3gx6-h57h-rm27 |
| Packagist | drupal/drupal | >= 8.6.0, < 8.6.10 | 8.6.10 | GHSA-3gx6-h57h-rm27 |
Advisories 1
- WID-SEC-2026-2002 Drupal Core: Mehrere Schwachstellen BSI CERT-Bund (WID) · Jul 12, 2026
References
- https://www.synology.com/security/advisory/Synology_SA_19_09
- 46452 exploit
- https://www.drupal.org/sa-core-2019-003
- 46510 exploit
- 107106 vdb-entry
- 46459 exploit