Remote code execution via predictable test-site HMAC
Published May 5, 2021 · Updated Aug 4, 2024
Remote code execution in Drupal Core 8.8.0 through 8.8.7, 8.9.0, and 9.0.0 allows remote attackers to execute arbitrary PHP code. The drupal_valid_test_ua() check reads a .htkey directory as though it were a file, reducing its HMAC key on Windows to a guessable bootstrap.inc creation time because fileinode() returns zero. Exploitation requires creation of that directory, achieved in the demonstration by luring a logged-in administrator when Interface Translation is enabled, after which a hidden test site and malicious serialized database entry provide code execution with web-server privileges.
Summary
What happened
Remote code execution in Drupal Core 8.8.0 through 8.8.7, 8.9.0, and 9.0.0 allows remote attackers to execute arbitrary PHP code. The drupal_valid_test_ua() check reads a .htkey directory as though it were a file, reducing its HMAC key on Windows to a guessable bootstrap.inc creation time because fileinode() returns zero. Exploitation requires creation of that directory, achieved in the demonstration by luring a logged-in administrator when Interface Translation is enabled, after which a hidden test site and malicious serialized database entry provide code execution with web-server privileges.
The record
- CVE
- CVE-2020-13664
- Published
- May 5, 2021
- Updated
- Aug 4, 2024
- Vendor
- Drupal
- Product
- Drupal Core
- Classifications
- CWE-77, T1189, T1190
- Attack vector
- network
- Privileges
- unauthenticated
Timeline
How it unfolded
- May 5, 2021CVE publishedPublication date reported by the CVE source.
- Aug 4, 2024Record updatedLatest update available in the CVE record.
Exploitability
Present is not the same as exploitable
Compare your product and version with the public record. A matching version still requires validation against your environment.
Is a vulnerable build present?
Compare these published version ranges with your installed build and any vendor patches.
- Affected versionversion=8.8.x <8.8.8
- Affected versionversion=8.9.x <8.9.1
- Affected versionversion=9.0.1 <9.0.1
What conditions does exploitation require?
What is affected?
Published CVSS scores
CVSS describes severity. EPSS estimates exploitation probability.
Attacks
What attackers are doing with it
Daily unique IPs observed by Shadowserver honeypots for known exploited vulnerabilities (KEVs). Missing observations do not establish an absence of attacks.
Weakness, pattern, technique
Public exploit references
- Drupal test-site HMAC remote code execution demonstrationproof of concept · demonstrated
Labels summarize the accepted research assessment. They do not indicate a test against your environment.
Technologies
Your stack
See the directory against your own environment.
Your stack
Check the software in your environment
Book a demo to see how Hinoki identifies affected software and validates exploitability in your environment.
Book a demo