Arbitrary file upload in Drupal Core
CVE-2022-25277
Drupal core sanitizes filenames with dangerous extensions upon upload (reference: SA-CORE-2020-012) and strips leading and trailing dots from filenames to prevent uploading server configuration files (reference: SA-CORE-2019-010). However, the protections for these two vulnerabilities previously did not work correctly together. As a result, if the site were configured to allow the upload of files with an htaccess extension, these files' filenames would not be properly sanitized. This could allow bypassing the protections provided by Drupal core's default .htaccess files and possible remote code execution on Apache web servers. This issue is mitigated by the fact that it requires a field administrator to explicitly configure a file field to allow htaccess as an extension (a restricted permission), or a contributed module or custom code that overrides allowed file uploads.
Vulnerability class: Unrestricted File Upload
Published · last modified .
CVSS v3 metric
CVSS v3 base score 7.2 (High). Vector: CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H.
EPSS exploit prediction
EPSS: 0.014 (71.8th percentile), scored .
Low probability of exploitation in the next 30 days, but still tracked. 72nd percentile — 71.8% of CVEs in the catalogue have a lower EPSS than this one. How to read EPSS.
EPSS over last 30 days · oldest: 0.014 · newest: 0.014 · change: 0.000
Affected products
- Drupal Core — versions 9.4, 9.3
- Drupal
Weakness classification (CWE)
Public proof-of-concept exploits
References
- www.drupal.org/sa-core-2022-014 (Vendor Advisory)
Frequently asked questions
- What is CVE-2022-25277?
- CVE-2022-25277 is a high-severity vulnerability in Drupal Core, classified under Unrestricted Upload of File with Dangerous Type. CVSS score: 7.2/10. Published 2023-04-26.
- How severe is CVE-2022-25277?
- High severity. CVSS v3 base score is 7.2 out of 10.
- Is CVE-2022-25277 known to be exploited?
- 2 public proof-of-concept repositories are indexed. Not currently listed in the CISA KEV catalog.