{"id":"CVE-2019-6340","url":"https://www.cyber-defence.io/tools/cve/CVE-2019-6340","generatedAt":"2026-10-31T18:40:12.755Z","title":"Drupal Core Remote Code Execution Vulnerability","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.)","published":"2019-02-21T21:29:00.000Z","lastModified":"2026-06-17T02:39:02.000Z","status":"Analyzed","sourceIdentifier":"mlhess@drupal.org","cvss":{"version":"3.1","score":8.1,"severity":"HIGH","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H"},"cwe":["CWE-502"],"affected":["drupal/drupal"],"epss":{"score":0.92017,"percentile":0.9982,"date":"2026-10-30","history":[]},"kev":{"listed":true,"dateAdded":"2022-03-25","dueDate":"2022-04-15","knownRansomwareCampaignUse":"Unknown","notes":"Apply updates per vendor instructions.\nhttps://nvd.nist.gov/vuln/detail/CVE-2019-6340"},"exploits":{"count":3,"verified":true,"firstPublished":"2019-02-23","source":"Exploit-DB (https://gitlab.com/exploit-database/exploitdb)","entries":[{"edbId":46510,"kind":"exploit","title":"Drupal < 8.5.11 / < 8.6.10 - RESTful Web Services unserialize() Remote Command Execution (Metasploit)","url":"https://www.exploit-db.com/exploits/46510","sourceUrl":"https://gitlab.com/exploit-database/exploitdb/-/blob/main/exploits/php/remote/46510.rb","file":"exploits/php/remote/46510.rb","published":"2019-03-07","added":"2019-03-07","updated":"2019-03-07","author":"Metasploit","type":"remote","platform":"php","port":null,"verified":true,"codes":["CVE-2019-6340"],"tags":"Remote","aliases":null,"applicationUrl":null,"screenshotUrl":null,"referenceUrl":"https://raw.githubusercontent.com/rapid7/metasploit-framework/6ff18828c0273b7170469939a49e4b063d561799/modules/exploits/unix/webapp/drupal_restws_unserialize.rb"},{"edbId":46459,"kind":"exploit","title":"Drupal < 8.6.9 - REST Module Remote Code Execution","url":"https://www.exploit-db.com/exploits/46459","sourceUrl":"https://gitlab.com/exploit-database/exploitdb/-/blob/main/exploits/php/webapps/46459.py","file":"exploits/php/webapps/46459.py","published":"2019-02-25","added":"2019-02-25","updated":"2019-02-25","author":"leonjza","type":"webapps","platform":"php","port":null,"verified":false,"codes":["CVE-2019-6340"],"tags":null,"aliases":null,"applicationUrl":null,"screenshotUrl":null,"referenceUrl":null},{"edbId":46452,"kind":"exploit","title":"Drupal < 8.6.10 / < 8.5.11 - REST Module Remote Code Execution","url":"https://www.exploit-db.com/exploits/46452","sourceUrl":"https://gitlab.com/exploit-database/exploitdb/-/blob/main/exploits/php/webapps/46452.txt","file":"exploits/php/webapps/46452.txt","published":"2019-02-23","added":"2019-02-23","updated":"2019-02-23","author":"Charles Fol","type":"webapps","platform":"php","port":80,"verified":false,"codes":["CVE-2019-6340"],"tags":null,"aliases":null,"applicationUrl":null,"screenshotUrl":null,"referenceUrl":"https://www.ambionics.io/blog/drupal8-rce"}]},"verdict":{"level":"urgent","text":"Known to be exploited in the wild (CISA KEV, CISA remediation deadline 15 April 2022). Treat as an emergency change: patch or isolate now, then hunt for prior compromise."},"changes":[],"references":[{"url":"http://www.securityfocus.com/bid/107106","tags":["Broken Link","Third Party Advisory","VDB Entry"],"source":"mlhess@drupal.org"},{"url":"https://www.drupal.org/sa-core-2019-003","tags":["Mitigation","Vendor Advisory"],"source":"mlhess@drupal.org"},{"url":"https://www.exploit-db.com/exploits/46452/","tags":["Patch","Third Party Advisory","VDB Entry"],"source":"mlhess@drupal.org"},{"url":"https://www.exploit-db.com/exploits/46459/","tags":["Exploit","Third Party Advisory","VDB Entry"],"source":"mlhess@drupal.org"},{"url":"https://www.exploit-db.com/exploits/46510/","tags":["Exploit","Third Party Advisory"],"source":"mlhess@drupal.org"},{"url":"https://www.synology.com/security/advisory/Synology_SA_19_09","tags":["Third Party Advisory"],"source":"mlhess@drupal.org"},{"url":"http://www.securityfocus.com/bid/107106","tags":["Broken Link","Third Party Advisory","VDB Entry"],"source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://www.drupal.org/sa-core-2019-003","tags":["Mitigation","Vendor Advisory"],"source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://www.exploit-db.com/exploits/46452/","tags":["Patch","Third Party Advisory","VDB Entry"],"source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://www.exploit-db.com/exploits/46459/","tags":["Exploit","Third Party Advisory","VDB Entry"],"source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://www.exploit-db.com/exploits/46510/","tags":["Exploit","Third Party Advisory"],"source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://www.synology.com/security/advisory/Synology_SA_19_09","tags":["Third Party Advisory"],"source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2019-6340","tags":["US Government Resource"],"source":"134c704f-9b21-4f2e-91b3-4a467353bcc0"}],"sources":{"nvd":"https://nvd.nist.gov/vuln/detail/CVE-2019-6340","epss":"https://www.first.org/epss/","kev":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","exploitdb":"https://www.exploit-db.com/"},"licence":"CC BY 4.0 — link back to the CVE Explorer if you publish the results; upstream data remains subject to its own terms."}