Skip to content
OpenAdvisories
High · 7.7 CVE-2022-31627 EUVD-2022-53079GHSA-2c24-m9rj-gq8m

Heap buffer overflow in finfo_buffer

Published Jul 28, 2022 · Updated Sep 16, 2024 · Assigned by php

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 products

VendorProductAffectedFixed
PHP Group PHP 8.1.X – < 8.1.8 8.1.8

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Ubuntu 22.04 LTS php8.1 8.1.2-1ubuntu2.2 USN-5530-1
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed php8 8.1.8-1.1 openSUSE-SU-2024:12218-1

Amazon Linux

ReleasePackageFixed inAdvisory
Amazon Linux 2023 php8.1 +23 8.1.14-1.amzn2023.0.2 ALAS2023-2023-081

Advisories 5

References