CVE-2022-25277
PHP vulnerability analysis and mitigation

Overview

CVE-2022-25277 is a critical vulnerability in Drupal core that affects versions 9.3 and 9.4. The vulnerability was discovered in 2022 and involves improper filename sanitization when uploading files with dangerous extensions. This security flaw could potentially allow attackers to bypass Drupal core's default .htaccess file protections and execute remote code on Apache web servers (SecurityWeek, NVD).

Technical details

The vulnerability stems from an interaction between two security mechanisms in Drupal core: the filename sanitization for dangerous extensions (SA-CORE-2020-012) and the stripping of leading and trailing dots from filenames (SA-CORE-2019-010). These protections did not work correctly together, specifically when handling files with an htaccess extension. The vulnerability has been assigned a CVSS v3.1 base score of 7.2 (HIGH), with the vector string CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H (NVD).

Impact

If successfully exploited, this vulnerability could allow attackers to bypass the protections provided by Drupal core's default .htaccess files and potentially execute arbitrary PHP code on Apache web servers. The impact is somewhat mitigated as it requires specific conditions: either a field administrator must 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 must be present (NVD).

Mitigation and workarounds

The vulnerability has been patched in Drupal versions 9.4.3 and 9.3.19. Administrators are advised to update their Drupal installations to these versions or later to protect against this vulnerability (SecurityWeek).

Additional resources


SourceThis report was generated using AI

Related PHP vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-13828CRITICAL9
  • PHPPHP
  • mautic/core
NoYesDec 02, 2025
CVE-2025-13827HIGH8.8
  • PHPPHP
  • mautic/grapes-js-builder-bundle
NoYesDec 02, 2025
CVE-2025-66312MEDIUM6.2
  • PHPPHP
  • getgrav/grav
NoYesDec 01, 2025
CVE-2025-66311MEDIUM6.2
  • PHPPHP
  • getgrav/grav
NoYesDec 01, 2025
CVE-2025-66310MEDIUM6.2
  • PHPPHP
  • getgrav/grav
NoYesDec 01, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management