Remote PHP code execution in Drupal

Published: 2019-02-21 | Updated: 2019-02-27
Risk High
Patch available YES
Number of vulnerabilities 1
CVE-ID CVE-2019-6340
Exploitation vector Network
Public exploit Vulnerability #1 is being exploited in the wild.
Vulnerable software
Web applications / CMS

Vendor Drupal

Security Bulletin

This security bulletin contains information about 1 vulnerabilities.

UPDATED 27.02.2019
The CVSS score of the vulnerability was changed to reflect in-the-wild exploitation of the vulnerability days after release of the official patch.

1) Code Injection

EUVDB-ID: #VU17807

Risk: High


CVE-ID: CVE-2019-6340

CWE-ID: CWE-94 - Improper Control of Generation of Code ('Code Injection')

Exploit availability: Yes


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.


Install updates from vendor's website.

Vulnerable software versions

Drupal: 8.6.0 - 8.6.9, 8.5.0 - 8.5.10

CPE2.3 External links

Q & A

Can this vulnerability be exploited remotely?

Is there known malware, which exploits this vulnerability?