Code Injection in Drupal - CVE-2019-6340

 

Code Injection in Drupal - CVE-2019-6340

Published: February 21, 2019 / Updated: June 17, 2021


Vulnerability identifier: #VU17807
CSH Severity: High
CVSS v4: 9.3 [CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N]
CVE-ID: CVE-2019-6340
CWE-ID: CWE-94
Exploitation vector: Remote access
Exploit availability: The vulnerability is being exploited in the wild

Vulnerability details

The vulnerability allows a remote attacker to execute arbitrary PHP code on the target system.

The vulnerability exists due to improper input validation when processing field types in requests, related to API functionality. A remote attacker can send a specially crafted request and execute arbitrary PHP code on the target system.

Successful exploitation of this vulnerability may result in complete compromise of vulnerable system but requires that:

  • - RESTful Web Services (rest) module is enabled and accepts 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: we are aware of reports regarding in the wild exploitation of this vulnerability days after the official patch.

Affected software

Drupal
drupal7 (Debian package)

How to mitigate CVE-2019-6340

Install updates from vendor's website.

Drupal - addressed in versions 8.5.11, 8.6.10
drupal7 (Debian package) - update to 7.52-2+deb9u7

Links to Public Exploits and PoC-codes

External References

Related Security Bulletins