Skip to content

CVE-2022-31627 Heap buffer overflow in finfo_buffer

CriticalCVSS 9.8 EPSS 2.1%
Published
Updated
Exploit status
No public exploit known
Technology
PHPUbuntuPHP (language)

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.

Upgrade path

2 packages: 2 fixed.

PackageAffectedFixed inStatus
PHP >= 8.1.0, < 8.1.8; >= 8.1.X, < 8.1.8 8.1.8 Fixed
ubuntu/php8.1(Ubuntu 22.04) < 8.1.2-1ubuntu2.2; = 8.1.0-1; = 8.1.0~rc4-1ubuntu2; = 8.1.2-1ubuntu1 +2 more 8.1.2-1ubuntu2.2 Fixed

Affected products

ProductAffected versionsFixed in
PHP >= 8.1.X, < 8.1.8 8.1.8
ubuntu/php8.1(Ubuntu:22.04) < 8.1.2-1ubuntu2.2 8.1.2-1ubuntu2.2
PHP >= 8.1.0, < 8.1.8 8.1.8
ubuntu/php8.1(Ubuntu:22.04) = 8.1.0~rc4-1ubuntu2 No fix listed
ubuntu/php8.1(Ubuntu:22.04) = 8.1.0-1 No fix listed
ubuntu/php8.1(Ubuntu:22.04) = 8.1.2-1ubuntu1 No fix listed
ubuntu/php8.1(Ubuntu:22.04) = 8.1.2-1ubuntu2 No fix listed
ubuntu/php8.1(Ubuntu:22.04) = 8.1.2-1ubuntu2.1 No fix listed

References