{"id":"CVE-2022-25277","published":"2023-04-26T00:00:00Z","modified":"2025-02-03T18:41:34Z","title":"Drupal core sanitizes filenames with dangerous extensions upon upload (reference: SA-CORE-2020-012) and strips leading…","vendor":"Drupal","product":"Core","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.2,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H","provenance":"source","from":"CISA ADP Vulnrichment"},"epss":{"score":0.01422,"percentile":0.73514,"provenance":"source"},"cwes":[{"id":"CWE-434","name":"Unrestricted Upload of File with Dangerous Type"}],"references":[{"url":"https://www.drupal.org/sa-core-2022-014","tags":[]}],"priority":{"score":19.7,"factors":[{"name":"EPSS percentile","points":14.7},{"name":"CVSS severity","points":5.04}]},"vendorSlug":"drupal","affectedVersions":[{"vendor":"Drupal","product":"Core","versions":[">= 9.4, < 9.4.3",">= 9.3, < 9.3.19"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total","timestamp":"2025-02-03T18:41:13.134312Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"Packagist","package":"drupal/core","vulnerableRanges":[">=8.0.0, <9.3.19",">=9.4.0, <9.4.3"],"patched":["9.3.19","9.4.3"],"from":["GHSA-6955-67hm-vjjq","DRUPAL-CORE-2022-014"],"provenance":"source"}],"summary":{"text":"The flaw is in Drupal core's file upload handling, where the filename sanitization that blocks dangerous extensions and stripped leading or trailing dots did not work correctly together, so files with an htaccess extension were not properly sanitized. An attacker who has high-privilege access, which requires a field administrator to have explicitly allowed htaccess as an upload extension (or a contributed module or custom code overriding allowed uploads), could bypass Drupal core's default .htaccess protections and potentially achieve remote code execution on Apache web servers.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T07:16:26Z"},"euvd":{"id":"EUVD-2022-6493","exploited":false,"provenance":"source"}}