Vulnerability · Published Jul 28, 2022 · Assigned by php

CVE-2022-31627Heap buffer overflow in finfo_buffer

High 7.7

In plain English

A high-severity security flaw in PHP from PHP Group. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 2.1% (higher than 82% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)7.7High
Exploit odds (30 days)2.1%top 17.9% of all CVEs
Exploited in the wildNo reportsnot in CISA KEV
Attack toolingNoneno public tooling known

Official description

In PHP versions 8.1.x below 8.1.8, when fileinfo functions, such as finfo_buffer, due to incorrect patch applied to the third party code from libmagic, incorrect function may be used to free allocated memory, which may lead to heap corruption.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Ubuntu:22.04:LTSphp8.18.1.2-1ubuntu2.2USN-5530-1
Ubuntu:22.04:LTSphp8.18.1.2-1ubuntu2.2UBUNTU-CVE-2022-31627

Affected products (as reported)

VendorProductVersions
PHP Group PHP 8.1.X – before 8.1.8

Weakness: CWE-590 · Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:L

References