PT-2022-3918 · Drupal · Drupal
Elar Lang
·
Published
2022-07-20
·
Updated
2024-03-06
·
CVE-2022-25277
CVSS v2.0
9.0
High
| Vector | AV:N/AC:L/Au:S/C:C/I:C/A:C |
Name of the Vulnerable Software and Affected Versions
Drupal core versions 7, 9.3, and 9.4
Description
The issue arises from the incorrect interaction between two protections in Drupal core: one that sanitizes filenames with dangerous extensions upon upload and another that strips leading and trailing dots from filenames to prevent uploading server configuration files. If a site is configured to allow the upload of files with an htaccess extension, these files' filenames would not be properly sanitized, potentially allowing bypassing of the protections provided by Drupal core's default .htaccess files and possible remote code execution on Apache web servers. This is mitigated by the requirement for a field administrator to explicitly configure a file field to allow htaccess as an extension or for a contributed module or custom code to override allowed file uploads.
Recommendations
For Drupal core version 7: Update to version 7.91.
For Drupal core version 9.3: Update to version 9.3.19.
For Drupal core version 9.4: Update to version 9.4.3.
As a temporary workaround, consider restricting the upload of files with an htaccess extension until the issue is resolved.
Exploit
Fix
RCE
Unrestricted File Upload
Code Injection
Found an issue in the description? Have something to add? Feel free to write us 👾
Related Identifiers
Affected Products
Drupal