CVE-2022-31627
JSON

7.7high

Heap buffer overflow in finfo_buffer

Severity
7.7high CVSS:3.1 by php
Exploit likelihood
2.14% (higher than 82% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
php
Also known as
BIT-LIBPHP-2022-31627BIT-PHP-2022-31627BIT-PHP-MIN-2022-31627

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

Product or packageVersionsReported by
PHP Group PHPfrom 8.1.X before 8.1.8CVE List
php phpfrom 8.1.0 before 8.1.8NVD
libphp (Bitnami)from 8.1.0 before 8.1.8Bitnami Vulnerability Database
php (Bitnami)from 8.1.0 before 8.1.8Bitnami Vulnerability Database
php-min (Bitnami)from 8.1.0 before 8.1.8Bitnami Vulnerability Database

All scores

php7.7high CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:L
NVD9.8critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Bitnami Vulnerability Databasecritical rating

Classification

What each source says

CVE List

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.

NVD (es)

En PHP versiones 8.1.x anteriores a 8.1.8, cuando las funciones fileinfo, como finfo_buffer, debido a un parche incorrecto aplicado al código de terceros de libmagic, puede usarse una función incorrecta para liberar la memoria asignada, lo que puede conllevar a una corrupción de la pila

References

https://bugs.php.net/bug.php?id=81723advisory, exploit, issue-tracking, patch, third-party-advisory
https://security.netapp.com/advisory/ntap-20220826-0008/advisory, third-party-advisory
https://security.gentoo.org/glsa/202209-20advisory, third-party-advisory, vendor-advisory
https://nvd.nist.gov/vuln/detail/CVE-2022-31627web

Sources

SourceRecordLicence
CVE ListCVE-2022-31627 changed 2024-09-16CVE Terms of Use
NVDCVE-2022-31627 changed 2026-06-17Public domain
Bitnami Vulnerability DatabaseBIT-LIBPHP-2022-31627 changed 2026-09-08Apache-2.0
Bitnami Vulnerability DatabaseBIT-PHP-2022-31627 changed 2026-09-08Apache-2.0
Bitnami Vulnerability DatabaseBIT-PHP-MIN-2022-31627 changed 2026-09-08Apache-2.0