# CVE-2022-25277: Drupal core arbitrary PHP code execution

- Severity: High 7.2 (CVSS:3.1, scored by CISA-ADP) `CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.50%, higher than 75% of CVEs (2026-11-30)
- Published: 2022-07-20T15:40:05.000Z
- Modified: 2026-09-19T18:17:25.000Z
- Also known as: GHSA-6955-67hm-vjjq, BIT-DRUPAL-2022-25277, DRUPAL-CORE-2022-014
- Weaknesses: CWE-434
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: drupal

## Description

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.

(As written by CVE List.)

## Affected

- Drupal Core: from 9.4 before 9.4.3; from 9.3 before 9.3.19
- drupal/core (Packagist): from 8.0.0 before 9.3.19; from 9.4.0 before 9.4.3
- drupal drupal: from 8.0.0 before 9.3.19; from 9.4.0 before 9.4.3
- drupal (Bitnami): from 8.0.0 before 9.3.19; from 9.4.0 before 9.4.3

## Every score

- CISA-ADP: CVSS:3.1 7.2 High `CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H`
- GitHub: CVSS:3.1 7.2 High `CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 7.2 High `CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H`
- Bitnami Vulnerability Database: rating High

## References

- <https://www.drupal.org/sa-core-2022-014> (advisory, vendor-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2022-25277> (advisory, web)
- <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)

## Sources

- CVE List: [CVE-2022-25277](https://www.cve.org/CVERecord?id=CVE-2022-25277), CVE Terms of Use, modified 2025-02-03
- GitHub Advisory Database: [GHSA-6955-67hm-vjjq](https://github.com/advisories/GHSA-6955-67hm-vjjq), CC-BY-4.0, modified 2025-12-10
- Drupal Security Team: [DRUPAL-CORE-2022-014](https://osv.dev/vulnerability/DRUPAL-CORE-2022-014), MIT, modified 2026-09-19
- NVD: [CVE-2022-25277](https://nvd.nist.gov/vuln/detail/CVE-2022-25277), Public domain, modified 2026-06-17
- Bitnami Vulnerability Database: [BIT-DRUPAL-2022-25277](https://osv.dev/vulnerability/BIT-DRUPAL-2022-25277), Apache-2.0, modified 2026-09-08

---

Page: https://cve.day/CVE-2022-25277 · Whole record: https://cve.day/CVE-2022-25277.json · Rebuilt by cve.day 2026-11-25T22:58:19.129Z
