Unrestricted file upload in Drupal Core
Key facts
- Attack vector
- Network
- Privileges required
- High
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Code execution
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CISA ADP. Fix status from CNA and GitHub. Impact type from CWE-434.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Total
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| Drupal | Core | 9.4 to before 9.4.3; 9.3 to before 9.3.19 | 9.4.3, 9.3.19 | Patch available | CNA |
| — | drupal/core (Packagist) | 8.0.0 to before 9.3.19 | 9.3.19 | Patch available | GHSA-6955-67hm-vjjq |
| — | drupal/core (Packagist) | 9.4.0 to before 9.4.3 | 9.4.3 | Patch available | GHSA-6955-67hm-vjjq |
- Core VendorDrupal Affected 9.4 to before 9.4.3; 9.3 to before 9.3.19 Fixed in 9.4.3, 9.3.19 Patch available CNA
- drupal/core (Packagist) Vendor— Affected 8.0.0 to before 9.3.19 Fixed in 9.3.19 Patch available GHSA-6955-67hm-vjjq
- drupal/core (Packagist) Vendor— Affected 9.4.0 to before 9.4.3 Fixed in 9.4.3 Patch available GHSA-6955-67hm-vjjq
Remediation
- Fix · CNA Core (Drupal) Fixed in 9.4.3, 9.3.19
- Fix · GHSA-6955-67hm-vjjq drupal/core (Packagist) Fixed in 9.3.19 Advisory →
- Fix · GHSA-6955-67hm-vjjq drupal/core (Packagist) Fixed in 9.4.3 Advisory →
Fixed in the same release
Records fixed by the same vendor advisory or release, as the CNA lists them.
- Release ·
Drupal Core 9.3.19, 9.4.3
3 records Highest priority Priority LOW 3 LOW
Other records, highest priority first
- TI-2022-08983 Under certain circumstances, the Drupal core form API evaluates form element access…Priority LOW 30
- TI-2022-08981 Cross-site scripting in Drupal CorePriority LOW 28
Vendor assessments
Timeline
- 2026-10-02 Threatist record created from CVE-2022-25277
- 2026-10-03 Alias added: GHSA-6955-67hm-vjjq
References
More Drupal vulnerabilities
- TI-2026-07979 Drupal core - Highly critical - SQL injection - SA-CORE-2026-004 KEVCVSS 3.1CRITICAL 9.8
- TI-2018-05494 Drupal core - Highly critical - Remote Code Execution - SA-CORE-2018-004 KEVCVSS 3.1CRITICAL 9.8
- TI-2018-05493 Improper input validation in Drupal before 7.58, 8.x before 8.3.9, 8.4.x before 8.4.6… KEVCVSS 3.1CRITICAL 9.8
- TI-2020-10731 Unrestricted file upload in Drupal Core KEVCVSS 3.1HIGH 8.8
- TI-2019-04505 Drupal core - Highly critical - Remote Code Execution KEVCVSS 3.1HIGH 8.1
- TI-2020-17477 Archive_Tar through 1.4.10 has :// filename sanitization only to address phar attacks… KEVCVSS 3.1HIGH 7.8
Sources
- CVE-2022-25277 · CVE Program
- CVE-2022-25277 · NVD
- FIRST EPSS
- GHSA-6955-67hm-vjjq · GitHub Advisory Database · CC BY 4.0
- CVE-2022-25277 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences