CVE-2019-6340

HIGH KEV NUCLEI LAB

Drupal 7.0.0-7.61.0 8.5.0-8.5.10 8.6.0-8.6.9 - Remote Code Execution via Unsanitized Field Data

Title source: llm
STIX 2.1

Exploitation Summary

CVE-2019-6340 is actively exploited and listed in the CISA Known Exploited Vulnerabilities (KEV) catalog, added March 25, 2022. EIP tracks 17 public exploits from researchers including Metasploit, leonjza, Charles Fol, including a Metasploit module exploits/unix/webapp/drupal_restws_unserialize. A Nuclei detection template is also available.

AI-analyzed exploit summary This Metasploit module exploits a PHP unserialize() vulnerability in Drupal RESTful Web Services (CVE-2019-6340) by sending a crafted request to the /node REST endpoint. It supports multiple HTTP methods (GET, POST, PATCH, PUT) and includes checks for vulnerability and patch status.

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

Exploits (17)

exploitdb WORKING POC VERIFIED
by Metasploit · rubyremotephp
https://www.exploit-db.com/exploits/46510

This Metasploit module exploits a PHP unserialize() vulnerability in Drupal RESTful Web Services (CVE-2019-6340) by sending a crafted request to the /node REST endpoint. It supports multiple HTTP methods (GET, POST, PATCH, PUT) and includes checks for vulnerability and patch status.

Classification
Working Poc 100%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: Drupal < 8.5.11 and < 8.6.10
No auth needed
Prerequisites: Drupal RESTful Web Services module enabled · Access to the /node REST endpoint
mistral-large-3 · analyzed Feb 16, 2026 Full analysis →
exploitdb WORKING POC
by leonjza · pythonwebappsphp
https://www.exploit-db.com/exploits/46459

This exploit leverages a deserialization vulnerability in Drupal's REST services to achieve unauthenticated remote code execution. It uses Guzzle gadgets to execute arbitrary commands on the target system.

Classification
Working Poc 100%
Attack Type
Rce
Complexity
Moderate
Reliability
Racy
Target: Drupal <= 8.6.9
No auth needed
Prerequisites: Target must be running a vulnerable version of Drupal · REST services must be enabled
mistral-large-3 · analyzed Feb 16, 2026 Full analysis →
exploitdb WORKING POC
by Charles Fol · textwebappsphp
https://www.exploit-db.com/exploits/46452

This exploit leverages a deserialization vulnerability in Drupal 8.6.9's REST module by sending a crafted HAL+JSON request with a serialized payload to achieve remote code execution (RCE). The payload is generated using PHPGGC to exploit Guzzle's deserialization behavior.

Classification
Working Poc 100%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: Drupal 8.6.9
No auth needed
Prerequisites: Drupal 8.6.9 with REST module enabled · Access to the Drupal REST endpoint
mistral-large-3 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC 71 stars
by jas502n · remote
https://github.com/jas502n/CVE-2019-6340

This repository contains a functional exploit for CVE-2019-6340, a remote code execution vulnerability in Drupal 8's REST API. The exploit leverages deserialization to execute arbitrary commands on the target system.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: Drupal 8
No auth needed
Prerequisites: Drupal 8 installation with REST API enabled
mistral-large-3 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC 42 stars
by knqyf263 · remote
https://github.com/knqyf263/CVE-2019-6340

This repository contains a working proof-of-concept exploit for CVE-2019-6340, a deserialization vulnerability in Drupal 8. The exploit leverages a crafted payload to achieve remote code execution (RCE) via the GuzzleHttp library.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: Drupal 8
No auth needed
Prerequisites: Drupal 8 installation with RESTful Web Services enabled
mistral-large-3 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC 32 stars
by g0rx · poc
https://github.com/g0rx/Drupal-SA-CORE-2019-003

This is a functional exploit for CVE-2019-6340, targeting Drupal 8's REST services to achieve unauthenticated remote code execution via deserialization gadgets in the Guzzle HTTP client library. The PoC automates node discovery, vulnerability checking, and command execution.

Classification
Working Poc 100%
Attack Type
Rce
Complexity
Moderate
Reliability
Racy
Target: Drupal 8.x (up to 8.6.9)
No auth needed
Prerequisites: RESTful Web Services module enabled · Access to a vulnerable Drupal endpoint
mistral-large-3 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC 12 stars
by oways · poc
https://github.com/oways/CVE-2019-6340

This PoC exploits a deserialization vulnerability in Drupal (CVE-2019-6340) to achieve remote code execution by crafting a malicious JSON payload with a GuzzleHttp object. The exploit leverages the REST API to trigger the payload, executing arbitrary PHP functions.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: Drupal 8.6.x (prior to 8.6.10)
No auth needed
Prerequisites: Target must have REST API enabled · Target must be vulnerable to deserialization
mistral-large-3 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC 4 stars
by ludy-dev · remote
https://github.com/ludy-dev/drupal8-REST-RCE

This PoC exploits CVE-2018-7600 in Drupal 8 via REST API endpoints to achieve remote code execution (RCE). It sends crafted payloads to '/node/1' and '/user/register' endpoints to trigger deserialization vulnerabilities.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: Drupal 8
No auth needed
Prerequisites: Drupal 8 instance with REST API enabled · Network access to the target
mistral-large-3 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC 2 stars
by DevDungeon · poc
https://github.com/DevDungeon/CVE-2019-6340-Drupal-8.6.9-REST-Auth-Bypass

This repository contains a working exploit for CVE-2019-6340, a Drupal RESTful Web Services authentication bypass leading to remote code execution via deserialization. The exploit leverages a crafted payload to execute arbitrary commands on the target system.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: Drupal 8.6.9
No auth needed
Prerequisites: RESTful Web Services module enabled · HAL module enabled · HTTP Basic Authentication module enabled · Serialization module enabled
mistral-large-3 · analyzed Feb 16, 2026 Full analysis →
github WORKING POC 1 stars
by vaishakhcv · perlpoc
https://github.com/vaishakhcv/CVE-exploits/tree/master/CVE-2019-6340

This repository contains a functional Perl exploit for CVE-2019-6340, targeting Drupal 8's REST module RCE vulnerability. The exploit leverages deserialization via crafted JSON payloads to achieve remote code execution.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: Drupal 8 (with REST module enabled)
No auth needed
Prerequisites: Drupal 8 with REST module enabled · network access to the target
mistral-large-3 · analyzed Feb 27, 2026 Full analysis →
nomisec WORKING POC
by joaoaugustom · remote
https://github.com/joaoaugustom/Drupal_REST-RCE_Unauthenticated

This repository contains a functional Python exploit for CVE-2019-6340, targeting Drupal's RESTful Web Services unserialize() vulnerability. It leverages a Guzzle/RCE1 gadget chain to achieve remote code execution via crafted HAL+JSON payloads, with improvements over the original exploit by using POST requests to bypass caching.

Classification
Working Poc 100%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: Drupal < 8.5.11 and < 8.6.10
No auth needed
Prerequisites: REST module enabled in Drupal · access to the REST endpoint
mistral-large-3 · analyzed May 27, 2026 Full analysis →
nomisec WORKING POC
by Sumitpathania03 · remote
https://github.com/Sumitpathania03/Drupal-cve-2019-6340

This is a functional exploit for CVE-2019-6340, targeting Drupal 8's RESTful API module. It leverages deserialization via Guzzle HTTP client gadgets to achieve unauthenticated remote code execution (RCE).

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Moderate
Reliability
Racy
Target: Drupal 8.6.9 (with RESTful API module enabled)
No auth needed
Prerequisites: Drupal 8 with RESTful API module enabled · At least one existing node/content on the target site · No caching or cache bypass required
mistral-large-3 · analyzed Feb 16, 2026 Full analysis →
github WORKING POC
by winterwolf32 · perlpoc
https://github.com/winterwolf32/CVE_Exploits-/tree/master/CVE-2019-6340

This repository contains a functional Perl exploit for CVE-2019-6340, a deserialization vulnerability in Drupal 8's REST module. The exploit crafts a malicious payload to achieve remote code execution (RCE) by leveraging the insecure deserialization of user-supplied data.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: Drupal 8 (with REST module enabled)
No auth needed
Prerequisites: Drupal 8 with REST module enabled · Network access to the target
mistral-large-3 · analyzed Feb 27, 2026 Full analysis →
nomisec WORKING POC
by nobodyatall648 · remote
https://github.com/nobodyatall648/CVE-2019-6340

This exploit leverages a deserialization vulnerability in Drupal 8.6.x (CVE-2019-6340) via the RESTful Web Services module to achieve remote code execution. It crafts a malicious payload using GuzzleHttp's FnStream and HandlerStack classes to execute arbitrary commands.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: Drupal 8.6.x < 8.6.10 or Drupal < 8.5.11
No auth needed
Prerequisites: RESTful Web Services module enabled · Drupal 8.6.x < 8.6.10 or Drupal < 8.5.11
mistral-large-3 · analyzed Feb 16, 2026 Full analysis →
nomisec STUB
by cved-sources · poc
https://github.com/cved-sources/cve-2019-6340

The repository contains only a README and a Drupal settings.php file, with no actual exploit code or proof-of-concept. It appears to be part of a vulnerable container management tool (Cved) but lacks functional exploit details.

Classification
Stub 90%
Attack Type
Other
Complexity
Trivial
Reliability
Theoretical
Target: Drupal
No auth needed
Prerequisites: Drupal installation
mistral-large-3 · analyzed Feb 16, 2026 Full analysis →
nomisec WRITEUP
by josehelps · poc
https://github.com/josehelps/cve-2019-6340-bits

This repository contains analysis artifacts and an example playbook for CVE-2019-6340, a Drupal RESTful RCE vulnerability. The playbook is a Phantom SOAR automation script for incident response, not an exploit.

Classification
Writeup 90%
Attack Type
Other
Complexity
Moderate
Reliability
Theoretical
Target: Drupal
No auth needed
Prerequisites: Phantom SOAR platform · AWS integration for blacklisting/quarantine
mistral-large-3 · analyzed Feb 16, 2026 Full analysis →
metasploit WORKING POC NORMAL
by Jasper Mattsson, Charles Fol, Rotem Reiss, wvu · rubypocphp
https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/unix/webapp/drupal_restws_unserialize.rb

This Metasploit module exploits a PHP unserialize() vulnerability in Drupal RESTful Web Services (CVE-2019-6340) by sending a crafted request to the /node REST endpoint. It supports multiple HTTP methods (GET, POST, PATCH, PUT) and leverages PHP object injection via GuzzleHttp to achieve remote code execution.

Classification
Working Poc 100%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: Drupal < 8.5.11 and < 8.6.10
No auth needed
Prerequisites: Drupal RESTful Web Services modules enabled · Access to the /node REST endpoint
mistral-large-3 · analyzed Feb 16, 2026 Full analysis →

Nuclei Templates (1)

Drupal - Remote Code Execution
HIGHby madrobot
Shodan: http.component:"drupal" || cpe:"cpe:2.3:a:drupal:drupal"

References (7)

Core 7
Core References
Third Party Advisory x_refsource_confirm
https://www.synology.com/security/advisory/Synology_SA_19_09
Patch, Third Party Advisory, VDB Entry exploit x_refsource_exploit-db
https://www.exploit-db.com/exploits/46452/
Mitigation, Vendor Advisory x_refsource_confirm
https://www.drupal.org/sa-core-2019-003
Exploit, Third Party Advisory exploit x_refsource_exploit-db
https://www.exploit-db.com/exploits/46510/
Broken Link, Third Party Advisory, VDB Entry vdb-entry x_refsource_bid
http://www.securityfocus.com/bid/107106
Exploit, Third Party Advisory, VDB Entry exploit x_refsource_exploit-db
https://www.exploit-db.com/exploits/46459/

Scores

CVSS v3 8.1
EPSS 0.9202
EPSS Percentile 99.8%
Attack Vector NETWORK
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

CISA SSVC

Vulnrichment
Exploitation active
Automatable no
Technical Impact total

Lab Environment

COMMUNITY
Community Lab
docker pull drupal:8.6.9-apache
docker pull cved/base-lamp
+11 more repos

Details

CISA KEV 2022-03-25
VulnCheck KEV 2019-12-27
InTheWild.io 2019-02-25
ENISA EUVD EUVD-2022-2184
CWE
CWE-502
Status published
Products (3)
drupal/core 8.6.0 - 8.6.10Packagist
drupal/drupal 7.0.0 - 7.62.0Packagist
drupal/drupal 8.5.0 - 8.5.11
Published Feb 21, 2019
KEV Added Mar 25, 2022
Tracked Since Feb 18, 2026