Drupal Core
Drupal core - Highly critical - Remote Code Execution
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 versions and mitigation
From the CVE record, GitHub Security Advisories and the vendor's references.Affected
- >= 8.6.0, < 8.6.10
Fixed in 8.6.10
from GitHub Security Advisory GHSA-3gx6-h57h-rm27
- >= 7.0.0, < 7.62.0
Fixed in 7.62.0
from GitHub Security Advisory GHSA-3gx6-h57h-rm27
- >= 8.0.0, < 8.5.11
Fixed in 8.5.11
from GitHub Security Advisory GHSA-3gx6-h57h-rm27
- >= 7.0.0, < 7.62.0
Fixed in 7.62.0
from GitHub Security Advisory GHSA-3gx6-h57h-rm27
- >= 8.0.0, < 8.5.11
Fixed in 8.5.11
from GitHub Security Advisory GHSA-3gx6-h57h-rm27
- >= 8.6.0, < 8.6.10
Fixed in 8.6.10
from GitHub Security Advisory GHSA-3gx6-h57h-rm27
Mitigation
Upgrade drupal/core to 8.6.10 or later.
Upgrade drupal/core to 7.62.0 or later.
Upgrade drupal/core to 8.5.11 or later.
Upgrade drupal/drupal to 7.62.0 or later.
Upgrade drupal/drupal to 8.5.11 or later.
Upgrade drupal/drupal to 8.6.10 or later.
Timeline
Days relative to CVE publicationFirst public PoC 1.1 days after publication; added to CISA KEV 3.1 years after publication. First PoC: Drupal < 8.6.10 / < 8.5.11 - REST Module Remote Code Execution (Exploit-DB, 23 Feb 2019).
PoC repositories
Found on GitHub.11 PoCs · 1 pending · 5 suspicious or fake
PoCs 11
| Repository | Created | Stars | Assessment |
|---|---|---|---|
| knqyf263/CVE-2019-6340 | 23 Feb 2019 +1.7 d | 42 | PoC |
| DevDungeon/CVE-2019-6340-Drupal-8.6.9-REST-Auth-Bypass | 25 Feb 2019 +3.3 d | 2 | PoC |
| oways/CVE-2019-6340 | 25 Feb 2019 +3.4 d | 11 | PoC |
| cved-sources/cve-2019-6340 | 26 Feb 2019 +4.9 d | 0 | PoC via PoC Index |
| honeybot/wtf-plugin-honeybot-cve_2019_6340 | 6 Mar 2019 +12 d | 1 | PoC via PoC Index |
| d1vious/cve-2019-6340-bits | 12 Mar 2019 +18 d | 0 | PoC |
| josehelps/cve-2019-6340-bits | 12 Mar 2019 +18 d | 0 | PoC |
| jas502n/CVE-2019-6340 | 27 May 2019 +95 d | 71 | PoC |
| nobodyatall648/CVE-2019-6340 | 1 May 2021 +2.2 y | 0 | PoC |
| Sumitpathania03/Drupal-cve-2019-6340 | 22 Feb 2023 +4.0 y | 0 | PoC
Flags · score 30
Below the suspicion threshold (50); does not change the assessment. |
| joaoaugustom/Drupal_REST-RCE_Unauthenticated | 27 May 2026 +7.3 y | 0 | PoC |
Pending 1
| Repository | Created | Stars | Assessment |
|---|---|---|---|
| g0rx/Drupal-SA-CORE-2019-003 | 22 Feb 2019 +19 h | 30 | Pending · mkdir /quarantine/g0rx__Drupal-SA-CORE-2019-003-39ca80f5e361: permission denied |
Suspicious or fake 5
| Repository | Created | Stars | Assessment |
|---|---|---|---|
| borahan951/priv8.mechploit | 10 Nov 2019 +262 d | 1 | Fake |
| Mezantrop74/M3M0 | 12 May 2020 +1.2 y | 0 | Fake |
| starling021/M3M0 | 30 Aug 2020 +1.5 y | 3 | Fake
Flags · score 15
Below the suspicion threshold (50); does not change the assessment. |
| ludy-dev/drupal8-REST-RCE | 31 Aug 2020 +1.5 y | 4 | Suspicious · score 50
Why suspicious
|
| reanzai/Reanzai-Penetration-Testing-tool | 30 Dec 2024 +5.9 y | 0 | Fake |
Only PoCs count toward the first-PoC date and the characteristics below. Suspicious repositories (score ≥ 50) never count. Do not run PoC code from unknown sources.
Other public exploits
Exploit-DB, Metasploit and nuclei count as public PoCs. Exploit-tagged references from the CVE record and NVD are links only. None of these are analysed by us.| Source | Title | Published | Found by us |
|---|---|---|---|
| CVE record (tagged exploit) | 46452 | unknown | 14 Nov 2026 |
| CVE record (tagged exploit) | 46459 | unknown | 14 Nov 2026 |
| CVE record (tagged exploit) | 46510 | unknown | 14 Nov 2026 |
| Exploit-DB | Drupal < 8.6.10 / < 8.5.11 - REST Module Remote Code Execution | 23 Feb 2019 | 14 Nov 2026 |
| Exploit-DB | Drupal < 8.6.9 - REST Module Remote Code Execution | 25 Feb 2019 | 14 Nov 2026 |
| Exploit-DB | Drupal < 8.5.11 / < 8.6.10 - RESTful Web Services unserialize() Remote Command Execution (Metasploit) | 7 Mar 2019 | 14 Nov 2026 |
| Metasploit | Metasploit exploit: Drupal RESTful Web Services unserialize() RCE (exploit/unix/webapp/drupal_restws_unserialize) | 5 Mar 2019 | 14 Nov 2026 |
| nuclei template | nuclei template: Drupal - Remote Code Execution | 27 Apr 2023 | 14 Nov 2026 |
PoC characteristics
What to hunt for in your logs · from 11 PoC reposPOST /node/
- Query
_format=hal_json- Key headers
Accept: */*Cache-Control: no-cache- Body markers
"link""value":"link""options""_links""type""href":"http://localhost/rest/type/shortcut/default"inapplication/hal+json- Ports
- 8080
- PoC User-Agent
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:55.0) Gecko/20100101 Firefox/55.0- Seen in
- 2 repos: jas502n/CVE-2019-6340, knqyf263/CVE-2019-6340
- Evidence
- jas502n/CVE-2019-6340/CVE-2019-6340.py:38 jas502n/CVE-2019-6340/README.md:105 knqyf263/CVE-2019-6340/README.md:37
GET /node/1
- Query
_format=hal_json- Content-Type
application/hal+json- Ports
- 8080
- Seen in
- 1 repo: knqyf263/CVE-2019-6340
- Evidence
- knqyf263/CVE-2019-6340/README.md:16
GET /node/3
- Query
_format=hal_json- Key headers
Accept: application/hal+jsonCache-Control: no-cache- Content-Type
application/hal+json- Ports
- 8000
- Seen in
- 1 repo: DevDungeon/CVE-2019-6340-Drupal-8.6.9-REST-Auth-Bypass
- Evidence
- DevDungeon/CVE-2019-6340-Drupal-8.6.9-REST-Auth-Bypass/exploit.py:36
PATCH /node/1
- Query
_format=hal_json- Body markers
"link""_links"inapplication/json- Ports
- 8090
- Seen in
- 1 repo: nobodyatall648/CVE-2019-6340
- Evidence
- nobodyatall648/CVE-2019-6340/CVE-2019-6340.py:42
POST /entity/node/
- Query
_format=hal_json- Key headers
Accept: application/hal+jsonCache-Control: no-cache- Content-Type
application/hal+json- Ports
- 8000
- Seen in
- 1 repo: DevDungeon/CVE-2019-6340-Drupal-8.6.9-REST-Auth-Bypass
- Evidence
- DevDungeon/CVE-2019-6340-Drupal-8.6.9-REST-Auth-Bypass/create_node_via_rest.py:29
Regex
Generated from PoC characteristics; not yet reviewed. Matches the request path and query.
(?i)^/node/\?(?:.*&)?_format=hal_json
(?i)^/node/1\?(?:.*&)?_format=hal_json
(?i)^/node/3\?(?:.*&)?_format=hal_json
(?i)^/node/1\?(?:.*&)?_format=hal_json
(?i)^/entity/node/\?(?:.*&)?_format=hal_json
Suricata
Template generated from PoC characteristics. Review before deploying.
alert http any any -> $HOME_NET [8080] (msg:"GG PoC-Monitor CVE-2019-6340 Drupal Drupal Core exploit attempt"; flow:established,to_server; http.method; content:"POST"; http.uri; content:"/node/"; http.uri; content:"_format=hal_json"; http.header; content:"Accept: */*"; nocase; http.header; content:"Cache-Control: no-cache"; nocase; http.request_body; content:"|22|link|22|"; http.request_body; content:"|22|value|22|:|22|link|22|"; http.request_body; content:"|22|options|22|"; http.request_body; content:"|22|_links|22|"; http.request_body; content:"|22|type|22|"; http.request_body; content:"|22|href|22|:|22|http://localhost/rest/type/shortcut/default|22|"; reference:url,poc.griffinguard.io/cve/CVE-2019-6340; classtype:web-application-attack; sid:9631410; rev:1;)
alert http any any -> $HOME_NET [8080] (msg:"GG PoC-Monitor CVE-2019-6340 Drupal Drupal Core exploit attempt"; flow:established,to_server; http.method; content:"GET"; http.uri; content:"/node/1"; http.uri; content:"_format=hal_json"; reference:url,poc.griffinguard.io/cve/CVE-2019-6340; classtype:web-application-attack; sid:9598763; rev:1;)
alert http any any -> $HOME_NET [8000] (msg:"GG PoC-Monitor CVE-2019-6340 Drupal Drupal Core exploit attempt"; flow:established,to_server; http.method; content:"GET"; http.uri; content:"/node/3"; http.uri; content:"_format=hal_json"; http.header; content:"Accept: application/hal+json"; nocase; http.header; content:"Cache-Control: no-cache"; nocase; reference:url,poc.griffinguard.io/cve/CVE-2019-6340; classtype:web-application-attack; sid:9854001; rev:1;)
alert http any any -> $HOME_NET [8090] (msg:"GG PoC-Monitor CVE-2019-6340 Drupal Drupal Core exploit attempt"; flow:established,to_server; http.method; content:"PATCH"; http.uri; content:"/node/1"; http.uri; content:"_format=hal_json"; http.request_body; content:"|22|link|22|"; http.request_body; content:"|22|_links|22|"; reference:url,poc.griffinguard.io/cve/CVE-2019-6340; classtype:web-application-attack; sid:9321805; rev:1;)
alert http any any -> $HOME_NET [8000] (msg:"GG PoC-Monitor CVE-2019-6340 Drupal Drupal Core exploit attempt"; flow:established,to_server; http.method; content:"POST"; http.uri; content:"/entity/node/"; http.uri; content:"_format=hal_json"; http.header; content:"Accept: application/hal+json"; nocase; http.header; content:"Cache-Control: no-cache"; nocase; reference:url,poc.griffinguard.io/cve/CVE-2019-6340; classtype:web-application-attack; sid:9745212; rev:1;)
Sigma
Template generated from PoC characteristics. Review before deploying.
title: Drupal Drupal Core exploit attempt (CVE-2019-6340)
id: gg-pocmon-cve-2019-6340-9631410
status: experimental
description: Request pattern taken from public PoCs for CVE-2019-6340. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2019-6340
logsource:
category: webserver
detection:
selection:
cs-method: POST
cs-uri-stem|contains|all:
- '/node/'
cs-uri-query|contains|all:
- '_format=hal_json'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: high
tags:
- attack.initial_access
- attack.t1190
- cve.2019.6340
title: Drupal Drupal Core exploit attempt (CVE-2019-6340)
id: gg-pocmon-cve-2019-6340-9598763
status: experimental
description: Request pattern taken from public PoCs for CVE-2019-6340. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2019-6340
logsource:
category: webserver
detection:
selection:
cs-method: GET
cs-uri-stem|contains|all:
- '/node/1'
cs-uri-query|contains|all:
- '_format=hal_json'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: high
tags:
- attack.initial_access
- attack.t1190
- cve.2019.6340
title: Drupal Drupal Core exploit attempt (CVE-2019-6340)
id: gg-pocmon-cve-2019-6340-9854001
status: experimental
description: Request pattern taken from public PoCs for CVE-2019-6340. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2019-6340
logsource:
category: webserver
detection:
selection:
cs-method: GET
cs-uri-stem|contains|all:
- '/node/3'
cs-uri-query|contains|all:
- '_format=hal_json'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: high
tags:
- attack.initial_access
- attack.t1190
- cve.2019.6340
title: Drupal Drupal Core exploit attempt (CVE-2019-6340)
id: gg-pocmon-cve-2019-6340-9321805
status: experimental
description: Request pattern taken from public PoCs for CVE-2019-6340. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2019-6340
logsource:
category: webserver
detection:
selection:
cs-method: PATCH
cs-uri-stem|contains|all:
- '/node/1'
cs-uri-query|contains|all:
- '_format=hal_json'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: high
tags:
- attack.initial_access
- attack.t1190
- cve.2019.6340
title: Drupal Drupal Core exploit attempt (CVE-2019-6340)
id: gg-pocmon-cve-2019-6340-9745212
status: experimental
description: Request pattern taken from public PoCs for CVE-2019-6340. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2019-6340
logsource:
category: webserver
detection:
selection:
cs-method: POST
cs-uri-stem|contains|all:
- '/entity/node/'
cs-uri-query|contains|all:
- '_format=hal_json'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: high
tags:
- attack.initial_access
- attack.t1190
- cve.2019.6340