CVE-2019-6340 in Drupal
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 Service...
Affects 1 product from 1 vendor. Facts below cite their sources.
Remotely exploitable over the network, high complexity, no authentication required, no user interaction needed, impact contained to the vulnerable component, full confidentiality impact, full integrity impact, full availability impact.
Affected products and versions
| Vendor | Product | Affected versions |
|---|---|---|
| Drupal | Drupal | ≥ 8.5.0, < 8.5.11 ≥ 8.6.0, < 8.6.10 |
A product listed here is affected only at the versions shown. Use the free check to test the exact version you run.
Fix and vendor advisory
Vendor PSIRT: [email protected]
Exploitation
| CISA known-exploited | Yes added 2022-03-25 |
|---|---|
| Public exploit | Reported · reference |
Official 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.)
Source: NIST NVD / MITRE CVE.
Record details
| CVE ID | CVE-2019-6340 |
|---|---|
| BreachSpider ID | BS-2019-GLOBAL-161175-H |
| CVSS vector | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H |
| Published | 2019-02-21 |
| Last modified | 2026-06-17 |
| Weakness (CWE) | |
| Source | NVD |
Weakness definitions
CWE-502: Deserialization of Untrusted Data
Software deserializes untrusted data without validation, allowing crafted objects to execute arbitrary code.
Related attack patterns (CAPEC)
CAPEC-586 Object Injection via CWE-502
Mapping is CWE to CAPEC per MITRE CAPEC 3.9.
Analysis AI-written, not human-reviewed
CVE-2019-6340 affects Drupal 8.5.x before 8.5.11 and Drupal 8.6.x before 8.6.10, leading to arbitrary PHP code execution if certain web services modules are enabled. This vulnerability is critical due to its high CVSS score and the availability of public exploits.
The vulnerability arises from improper data sanitization in certain field types when data is received from non-form sources. If the Drupal 8 core RESTful Web Services module or similar modules are enabled and allow PATCH or POST requests, an attacker can exploit this to execute arbitrary PHP code on the server.
Compensating controls AI-drafted, review before use
Ensure that all web services modules are updated to the latest versions and that unnecessary modules are disabled. Implement strict input validation and output encoding for all data received from non-form sources.
NERC CIP: CIP-007 CIP-007-R2
IEC 62443: SR 7.6
Not validated for your network. A compensating control does not replace the vendor fix.
Questions
What is CVE-2019-6340?
CVE-2019-6340 affects Drupal 8.5.x before 8.5.11 and Drupal 8.6.x before 8.6.10, leading to arbitrary PHP code execution if certain web services modules are enabled. This vulnerability is critical due to its high CVSS score and the availability of public exploits.
What is the CVSS score for CVE-2019-6340?
CVE-2019-6340 has CVSS 8.1 (High). Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H. EPSS: 92.0%.
Is CVE-2019-6340 actively exploited?
Yes. CVE-2019-6340 is in the CISA known-exploited catalog (added 2022-03-25). Active exploitation confirmed. Immediate patching required.
How do I remediate CVE-2019-6340?
Priority: IMMEDIATE. Advisory: https://www.drupal.org/sa-core-2019-003 PSIRT: [email protected]
What systems are affected by CVE-2019-6340?
CVE-2019-6340 affects Drupal Drupal.
What NERC-CIP standard applies to CVE-2019-6340?
NERC CIP CIP-007 CIP-007-R2: This CVE violates CIP-007-R2 because it allows unauthorized access to the system, which could compromise the integrity and availability of critical cyber assets.
What IEC 62443 requirement maps to CVE-2019-6340?
IEC 62443 SR 7.6: This CVE maps to SR 7.6 as it involves the protection against unauthorized modification of software, which is essential for maintaining the security of industrial control systems.
For developers and AI agents
Run this check from your own code or agent
REST API
curl -s https://breachspider.com/api/v1/assets/correlate-cves \
-H "Authorization: Bearer $BREACHSPIDER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"assets":[{"asset_id":"dev-1","vendor":"Drupal","product":"Drupal","version":"1.0"}]}'
MCP for AI agents
# hosted: add as a connector
https://mcp.breachspider.com/mcp
# local
pipx install breachspider-mcp
Free trial: 14 days, 750 device checks, no card.
Page facts from NVD, MITRE, CISA and vendor advisories, record last modified 2026-06-17.