CVE-2022-25277
HIGH 7.2CVSS 3.1Drupal core arbitrary PHP code execution
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.
- Published
- 26 Apr 2023
- Last modified
- 19 Sep 2026
- Assigned by
- mlhess@drupal.org
- NVD status
- Modified
- Weakness
- CWE-434
- Also known as
- BIT-drupal-2022-25277DRUPAL-CORE-2022-014GHSA-6955-67hm-vjjq
- Sources
- NVDJSONOSV DRUPAL-CORE-2022-014JSONOSV GHSA-6955-67hm-vjjqJSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | HIGH 7.2 | CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H |
| NVD | 134c704f-9b21-4f2e-91b3-4a467353bcc0 (Secondary) | CVSS 3.1 | HIGH 7.2 | CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H |
| OSV | GitHub | CVSS 3.1 | HIGH 7.2 | CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | drupal | drupalcpe:2.3:a:drupal:drupal:*:*:*:*:*:*:*:* |
>= 8.0.0, < 9.3.19 | 9.3.19 |
| NVD | drupal | drupalcpe:2.3:a:drupal:drupal:*:*:*:*:*:*:*:* |
>= 9.4.0, < 9.4.3 | 9.4.3 |
| OSV | Packagist | drupal/core | >= 8.0.0, < 9.3.19; >= 9.4.0, < 9.4.3 | 9.3.19, 9.4.3 |
| OSV | Packagist | drupal/core | >= 8.0.0, < 9.3.19 | 9.3.19 |
| OSV | Packagist | drupal/core | >= 9.4.0, < 9.4.3 | 9.4.3 |
References
- https://www.drupal.org/sa-core-2022-014 · Vendor Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2022-25277 · ADVISORY
- https://github.com/drupal/core/commit/1cd1830d79f221cc8490f53c2bb487dd07094f17 · WEB
- https://github.com/drupal/core/commit/5d464ea4407c50e40dcf6cb5ee376e7b8dd36f3a · WEB
- https://github.com/FriendsOfPHP/security-advisories/blob/master/drupal/core/CVE-2022-25277.yaml · WEB
- https://github.com/drupal/core · PACKAGE
History
- 25 Nov 2026 20:36 UTC · NVD: first stored (published 26 Apr 2023)
- 25 Nov 2026 20:15 UTC · OSV: first stored (published 6 Aug 2022)
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 20 Jul 2022)