CVE-2022-31627
PHP vulnerability analysis and mitigation

Overview

In PHP versions 8.1.x below 8.1.8, a vulnerability was discovered in the fileinfo functions, specifically affecting finfo_buffer. The vulnerability was assigned CVE-2022-31627 and was disclosed in July 2022. This vulnerability affects PHP installations across multiple operating systems and distributions (NVD, Ubuntu).

Technical details

The vulnerability is caused by a heap buffer overflow in the finfo_buffer function due to incorrect memory operations when obtaining file information. The issue stems from an incorrectly applied patch to third-party code. The vulnerability has received a CVSS v3.1 base score of 9.8 (CRITICAL) with the vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H (NetApp, PHP Bug).

Impact

Successful exploitation of this vulnerability could lead to disclosure of sensitive information, addition or modification of data, or Denial of Service (DoS). The vulnerability could potentially allow remote attackers to cause PHP to crash or possibly execute arbitrary code (Ubuntu Notice, NetApp).

Mitigation and workarounds

The vulnerability has been fixed in PHP version 8.1.8. Users are advised to upgrade to this version or later. For Ubuntu 22.04 users, the fix is available in php8.1 version 8.1.2-1ubuntu2.2. System administrators should apply the appropriate updates through their distribution's package management system (Ubuntu Notice, Gentoo).

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-65346CRITICAL9.1
  • PHPPHP
  • alexusmai/laravel-file-manager
NoNoDec 04, 2025
CVE-2025-66468HIGH7.6
  • PHPPHP
  • aimeos/ai-cms-grapesjs
NoYesDec 02, 2025
CVE-2025-65345MEDIUM6.5
  • PHPPHP
  • alexusmai/laravel-file-manager
NoNoDec 03, 2025
CVE-2025-65657MEDIUM6.5
  • PHPPHP
  • feehi/cms
NoNoDec 02, 2025
CVE-2025-65186MEDIUM6.1
  • PHPPHP
  • getgrav/grav
NoNoDec 02, 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