PoC Monitor
← All CVEs
CVE-2019-6340published 21 Feb 2019 21:00 UTCData: JSON · API

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.)

First public PoC 1.1 daysafter publication · 23 Feb 2019 · Exploit-DB
Public PoCs1611 on GitHub · 5 Exploit-DB, Metasploit or nuclei · +1 suspicious, not counted
CVSS8.1high · scored by CISA ADP · CWE-502
CISA KEV 25 Mar 20223.1 years after publication

Affected versions and mitigation

From the CVE record, GitHub Security Advisories and the vendor's references.

Affected

drupal/core (Packagist)
  • >= 8.6.0, < 8.6.10

Fixed in 8.6.10

from GitHub Security Advisory GHSA-3gx6-h57h-rm27

drupal/core (Packagist)
  • >= 7.0.0, < 7.62.0

Fixed in 7.62.0

from GitHub Security Advisory GHSA-3gx6-h57h-rm27

drupal/core (Packagist)
  • >= 8.0.0, < 8.5.11

Fixed in 8.5.11

from GitHub Security Advisory GHSA-3gx6-h57h-rm27

drupal/drupal (Packagist)
  • >= 7.0.0, < 7.62.0

Fixed in 7.62.0

from GitHub Security Advisory GHSA-3gx6-h57h-rm27

drupal/drupal (Packagist)
  • >= 8.0.0, < 8.5.11

Fixed in 8.5.11

from GitHub Security Advisory GHSA-3gx6-h57h-rm27

drupal/drupal (Packagist)
  • >= 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 publication
t=0+180+360+540+720+900+1080CVE published21 Feb 2019 · t = 0First public PoC23 Feb 2019 · t+1.1dAdded to CISA KEV25 Mar 2022 · t+3.1y

First 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
RepositoryCreatedStarsAssessment
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
  • owner account created less than 7 days before the repo

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
RepositoryCreatedStarsAssessment
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
RepositoryCreatedStarsAssessment
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
  • owner account created less than 30 days before the repo

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
  • owner account created less than 7 days before the repo
  • large base64 blob in code in drupal8-REST-RCE.py
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.
SourceTitlePublishedFound by us
CVE record (tagged exploit)46452unknown14 Nov 2026
CVE record (tagged exploit)46459unknown14 Nov 2026
CVE record (tagged exploit)46510unknown14 Nov 2026
Exploit-DBDrupal < 8.6.10 / < 8.5.11 - REST Module Remote Code Execution23 Feb 201914 Nov 2026
Exploit-DBDrupal < 8.6.9 - REST Module Remote Code Execution25 Feb 201914 Nov 2026
Exploit-DBDrupal < 8.5.11 / < 8.6.10 - RESTful Web Services unserialize() Remote Command Execution (Metasploit)7 Mar 201914 Nov 2026
MetasploitMetasploit exploit: Drupal RESTful Web Services unserialize() RCE (exploit/unix/webapp/drupal_restws_unserialize)5 Mar 201914 Nov 2026
nuclei templatenuclei template: Drupal - Remote Code Execution27 Apr 202314 Nov 2026

PoC characteristics

What to hunt for in your logs · from 11 PoC repos

POST /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" in application/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+json Cache-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" in application/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+json Cache-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.

POST /node/
(?i)^/node/\?(?:.*&)?_format=hal_json
GET /node/1
(?i)^/node/1\?(?:.*&)?_format=hal_json
GET /node/3
(?i)^/node/3\?(?:.*&)?_format=hal_json
PATCH /node/1
(?i)^/node/1\?(?:.*&)?_format=hal_json
POST /entity/node/
(?i)^/entity/node/\?(?:.*&)?_format=hal_json

Suricata

Template generated from PoC characteristics. Review before deploying.

POST /node/
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;)
GET /node/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;)
GET /node/3
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;)
PATCH /node/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;)
POST /entity/node/
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.

POST /node/
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
GET /node/1
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
GET /node/3
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
PATCH /node/1
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
POST /entity/node/
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