CVE-2022-31627 Heap buffer overflow in finfo_buffer
Heap buffer overflow in PHP's finfo_buffer function allows attackers to cause heap corruption, potentially leading to code execution or denial of service.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2022-31627?
CVE-2022-31627 is a high-severity memory corruption vulnerability in Php Php, published on 28 Jul 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.
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.
Which versions are affected by CVE-2022-31627?
3 open source packages ship an affected version, including libphp, php and php-min. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
libphp Bitnami | From 8.1.0 | 8.1.8 |
php Bitnami | From 8.1.0 | 8.1.8 |
php-min Bitnami | From 8.1.0 | 8.1.8 |
Linux distribution packages (1)
php8 openSUSE:Tumbleweed | All versions | 8.1.8-1.1 |
Products include Php Php.
How do I fix CVE-2022-31627?
Upgrade libphp to 8.1.8 or later.
Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.
Is CVE-2022-31627 being exploited?
There is no known exploitation of CVE-2022-31627 in the wild and no public exploit code.
Other vulnerabilities in Php Php
Sources
Also known as BIT-libphp-2022-31627, BIT-php-2022-31627, BIT-php-min-2022-31627, GHSA-2c24-m9rj-gq8m, UBUNTU-CVE-2022-31627, USN-5530-1 and 1 more.