← Vulnerability feed

Vulnerability record · CVE-2019-6340 · published 21 February 2019

CVE-2019-6340: Drupal Core field types fail to sanitize non-form data, enabling PHP code execution

DDrupal · Drupal

Some field types in Drupal 8.5.x before 8.5.11 and 8.6.x before 8.6.10 do not properly sanitize data arriving from non-form sources, which can lead to arbitrary PHP code execution. The flaw is only reachable on sites that expose a web services module accepting PATCH or POST requests, such as core REST, JSON:API, or the Drupal 7 Services/RESTful Web Services modules.

8.1 CVSS 3.1 High CISA KEV since 25 Mar 2022 EPSS 92% · top 0.2% CWE-502 · Deserialization of untrusted data
8.1CVSS 3.1 base score, v2 6.8
92%EPSS exploitation probability, 30 days
YesIn CISA KEV, fix deadline passed
1Affected product versions listed by NVD
13References, 4 tagged exploit
17 Jun 2026Last modified by NVD

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

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

Automated analysis

Generated by VULONE's analysis model from the NVD record, CISA KEV and EPSS data on 17 September 2026. Confidence: high.

critical priorityIt is in CISA KEV with public exploits and a very high EPSS score, and successful exploitation yields remote PHP code execution.

What it is

Some field types in Drupal 8.5.x before 8.5.11 and 8.6.x before 8.6.10 do not properly sanitize data arriving from non-form sources, which can lead to arbitrary PHP code execution. The flaw is only reachable on sites that expose a web services module accepting PATCH or POST requests, such as core REST, JSON:API, or the Drupal 7 Services/RESTful Web Services modules.

Impact

An attacker can execute arbitrary PHP code on the affected Drupal site, leading to full compromise of the web application and its data. Depending on the deployment, this can extend to the underlying host.

Attack surface

Reached over the network through enabled web services endpoints that accept PATCH or POST requests; no authentication or user interaction is required per the CVSS vector (AV:N/AC:H/PR:N/UI:N). Sites without such a module enabled are not affected.

Exploitation

CVE-2019-6340 is listed in CISA KEV with a 2022-03-25 addition date, and EPSS shows a 30-day probability of 0.92017 (99.8th percentile). Multiple public Exploit-DB entries are tagged as exploits, indicating weaponized code is available.

What to do

  • Upgrade Drupal 8.5.x to 8.5.11 or later and Drupal 8.6.x to 8.6.10 or later, per the vendor advisory sa-core-2019-003.
  • If immediate patching is not possible, disable or restrict the core REST, JSON:API, and other web services modules, or block PATCH/POST requests to their endpoints at the web server or WAF.
  • Apply the contributed module updates referenced in the same Drupal advisory, including Services-related updates for Drupal 7 sites.
  • Review Drupal 7 sites using Services or RESTful Web Services and confirm the associated contributed updates are applied.
  • After patching, audit for signs of prior compromise given the long window since public exploits appeared.

Detection

  • Monitor web server and Drupal logs for PATCH or POST requests to REST, JSON:API, or Services endpoints, especially from unexpected source addresses.
  • Inspect for unexpected PHP files, modified core or contributed module files, and anomalous child processes spawned by the web server user.
  • Alert on outbound network connections or new scheduled tasks originating from the Drupal host.
  • Use file integrity monitoring on the Drupal codebase to catch post-exploitation changes.

This assessment is produced automatically and is not human-reviewed. Verify against the vendor advisory before acting on it.

Exploitation in the wild

CISA added CVE-2019-6340 to the Known Exploited Vulnerabilities catalog on 25 March 2022 as "Drupal Core Remote Code Execution Vulnerability". Required action: Apply updates per vendor instructions. Federal deadline 15 April 2022.

Affected products

1 vulnerable configurations from NVD's CPE data, grouped by vendor and product.

References

LinkTags
http://www.securityfocus.com/bid/107106 Broken LinkThird Party AdvisoryVDB Entry
https://www.drupal.org/sa-core-2019-003 MitigationVendor Advisory
https://www.exploit-db.com/exploits/46452/ PatchThird Party AdvisoryVDB Entry
https://www.exploit-db.com/exploits/46459/ ExploitThird Party AdvisoryVDB Entry
https://www.exploit-db.com/exploits/46510/ ExploitThird Party Advisory
https://www.synology.com/security/advisory/Synology_SA_19_09 Third Party Advisory
http://www.securityfocus.com/bid/107106 Broken LinkThird Party AdvisoryVDB Entry
https://www.drupal.org/sa-core-2019-003 MitigationVendor Advisory
https://www.exploit-db.com/exploits/46452/ PatchThird Party AdvisoryVDB Entry
https://www.exploit-db.com/exploits/46459/ ExploitThird Party AdvisoryVDB Entry
https://www.exploit-db.com/exploits/46510/ ExploitThird Party Advisory
https://www.synology.com/security/advisory/Synology_SA_19_09 Third Party Advisory
https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2019-6340 US Government Resource

Track CVE-2019-6340 inside VULONE

Watch it alongside the ransomware crews, C2 infrastructure and forum chatter that reference it, query it through the API and pull it into your SIEM over TAXII.

Start free Open in platform

Related vulnerabilities

Same products first, then exploited flaws of the same weakness class.

9.8CVE-2026-9082Drupal core SQL injection in unauthenticated request pathDrupal core contains a SQL injection flaw (CWE-89) caused by improper neutralization of special elements in SQL commands. It affects multiple core br…KEVEPSS 16%analysed9.8CVE-2018-7602Drupal Core Remote Code Execution via Multiple SubsystemsCVE-2018-7602 is a remote code execution flaw in multiple subsystems of Drupal 7.x and 8.x, related to SA-CORE-2018-002. It allows an attacker to com…KEVEPSS 99%analysed9.8CVE-2018-7600Drupal Core input validation flaw enables remote code executionDrupal core before 7.58, 8.x before 8.3.9, 8.4.x before 8.4.6, and 8.5.x before 8.5.1 fails to properly validate input across multiple subsystems, al…KEVEPSS 100%analysed8.8CVE-2020-13671Drupal core filename sanitization flaw allows uploaded files to execute as PHPDrupal core fails to properly sanitize certain filenames on uploaded files, so files can be interpreted with the wrong extension and served as the wr…KEVEPSS 35%analysed7.8CVE-2020-28949PEAR Archive_Tar stream-wrapper filename sanitization bypass allows file writeArchive_Tar through 1.4.10 only sanitizes '://' filenames to block phar attacks, so other stream wrappers such as file:// still pass through and can …KEVEPSS 85%analysed7.5CVE-2020-36193PEAR Archive_Tar path traversal via symlink handlingTar.php in Archive_Tar through 1.4.11 fails to adequately check symbolic links, allowing write operations to escape the intended extraction directory…KEVEPSS 71%analysed6.1CVE-2020-11023jQuery DOM manipulation methods XSS via untrusted HTML option elementsjQuery versions 1.0.3 through before 3.5.0 execute untrusted code when HTML containing <option> elements from untrusted sources is passed to DOM mani…KEVEPSS 85%analysed10.0CVE-2009-3352Drupal vulnerabilityMultiple unspecified vulnerabilities in the quota_by_role (Quota by role) module for Drupal have unknown impact and attack vectors.EPSS 2.0%

Source: NIST National Vulnerability Database (record CVE-2019-6340), CISA KEV, FIRST EPSS (scores of 2026-09-25). This page is refreshed as NVD updates the record.