CVE-2019-6340 Drupal Core Remote Code Execution
Remote attackers can execute arbitrary PHP code via unsanitized data in specific field types when web services modules are enabled.
- Exploited in the wild
- Since 25 Mar 2022
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2019-6340?
CVE-2019-6340 is a high-severity unsafe deserialization vulnerability in Drupal Drupal, published on 21 Feb 2019. An attacker can exploit it over the internet without logging in, with no action from the victim.
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.)
Weakness: CWE-502
Which versions are affected by CVE-2019-6340?
13 open source packages ship an affected version, including drupal/core and drupal/drupal. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
drupal/core Packagist | From 7.0.0 | 7.62.0 |
drupal/core Packagist | From 7.0.0 | 7.62.0 |
drupal/core Packagist | From 8.0.0 | 8.5.11, 8.6.10 |
drupal/core Packagist | From 8.0.0 | 8.5.11 |
drupal/core Packagist | From 8.0.0 | 8.5.11 |
drupal/core Packagist | From 8.6.0 | 8.6.10 |
7 more packages
drupal/core Packagist | From 8.6.0 | 8.6.10 |
drupal/drupal Packagist | From 7.0.0 | 7.62.0 |
drupal/drupal Packagist | From 7.0.0 | 7.62.0 |
drupal/drupal Packagist | From 8.0.0 | 8.5.11 |
drupal/drupal Packagist | From 8.0.0 | 8.5.11 |
drupal/drupal Packagist | From 8.6.0 | 8.6.10 |
drupal/drupal Packagist | From 8.6.0 | 8.6.10 |
Products include Drupal Drupal.
How do I fix CVE-2019-6340?
Upgrade drupal/core to a fixed version for your release line: 7.62.0, 8.5.11 or 8.6.10. US federal agencies must fix it by 15 Apr 2022.
Upgrade, and only deserialise data from trusted sources or with an allow-list of types. More about Unsafe deserialization.
Is CVE-2019-6340 being exploited?
Yes. Attackers have exploited CVE-2019-6340 in the wild since at least 25 Mar 2022.
Public exploit code: 1 Metasploit module, 4 Exploit-DB entries, 1 Nuclei template and 11 proofs of concept on GitHub.
Other vulnerabilities in Drupal Drupal
Sources
Also known as DRUPAL-CORE-2019-003, GHSA-3gx6-h57h-rm27.