Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
Drupal-cve-2019-6340 — Python exploit for Drupal 8 core RESTful API RCE (CVE-2019-6340) that sends crafted requests to execute arbitrary commands on vulnerable sites. | Kitploit
Tools/GitHubGitHub/sumitpathania03/drupal-cve-2019-6340
Payload GenerationVulnerability AnalysisExploitationWeb Application ExploitationPenetration TestingRed TeamingArchived
GitHubsumitpathania03/drupal-cve-2019-6340

Drupal-cve-2019-6340

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →

Python exploit for Drupal 8 core RESTful API RCE (CVE-2019-6340) that sends crafted requests to execute arbitrary commands on vulnerable sites.

View Repository
13 years agoNot yet reviewed
Share

Research

CVE 2019-6340

root@kitploit:~
The site as Drupal 8 core RESTful API Services module gets enabled and allows the user to send GET, PATCH or POST Request to the server. 

(GET request is enough to trigger the code execution vulnerability even though PATCH method is disabled)

The site has any other web services module enabled like JSON-API in Drupal 8 or REST services in Drupal 7.

REQUIREMENTS FOR POC

DOCKER.IO

DRUPAL 8.6.9

SQL 5.7

docker run -d --name mysqldb -e MYSQL_ROOT_PASSWORD=password mysql:5.7

docker run -d --name drupal --link mysqldb -p 8090:80 -e MY_SQL_USER:root -e MY_SQL_PASSWORD:password drupal:8.6.9

exp run command

python3 exp.py http://Ip_of_drupal_container:port_assigned(if)// "command_to_execuite"

example:- python3 exp.py http://127.0.0.1:8090/ "hostname -I"

EXP ANALYSIS

Guzzle is a PHP HTTP client that makes it easy to send HTTP requests and trivial to integrate with web services and it used as a exploit to send malicous request to drupal based websites. if we analyse the guzzle script inside exploit code(exp.py) then we can find that a "command" string is replaced with the command that we pass at runtime (eg hostname -I)

exp

when we run exp command first it will look for an existing node so we have to make some nodes on our website ,basically you have add some content on the website

drupal

it will not access any node twice suppose you have added 5 nodes ,so after running your exploit 5 times you have to update your nodes simply go to content and appy any action on the nodes

REQUEST AND RESPONSE

req

res

Download Tool