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
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| 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.
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 22.04 LTS | php8.1 | 8.1.2-1ubuntu2.2 | USN-5530-1 |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Tumbleweed | php8 | 8.1.8-1.1 | openSUSE-SU-2024:12218-1 |
Amazon Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Amazon Linux 2023 | php8.1 +23 | 8.1.14-1.amzn2023.0.2 | ALAS2023-2023-081 |
Advisories 5
- USN-5530-1 php8.1 vulnerability Ubuntu Security Notices (USN) · Apr 22, 2026
- openSUSE-SU-2024:12218-1 php8-8.1.8-1.1 on GA media SUSE / openSUSE Security Updates · Feb 4, 2026
- WID-SEC-2023-1737 Juniper Patchday Juli 2023 BSI CERT-Bund (WID) · Jul 12, 2023
- ALAS2023-2023-081 Important: php8.1 security update (Amazon Linux 2023) Amazon Linux Security Center (ALAS) · Feb 22, 2023
- WID-SEC-2022-0601 PHP: Schwachstelle ermöglicht nicht spezifizierten Angriff BSI CERT-Bund (WID) · Dec 11, 2022