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 package | Versions | Reported by |
|---|---|---|
| PHP Group PHP | from 8.1.X before 8.1.8 | CVE List |
| php php | from 8.1.0 before 8.1.8 | NVD |
| libphp (Bitnami) | from 8.1.0 before 8.1.8 | Bitnami Vulnerability Database |
| php (Bitnami) | from 8.1.0 before 8.1.8 | Bitnami Vulnerability Database |
| php-min (Bitnami) | from 8.1.0 before 8.1.8 | Bitnami Vulnerability Database |
All scores
| php | 7.7high CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:L |
| NVD | 9.8critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| Bitnami Vulnerability Database | critical 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=81723 | advisory, 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-20 | advisory, third-party-advisory, vendor-advisory | |
| https://nvd.nist.gov/vuln/detail/CVE-2022-31627 | web | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2022-31627 changed 2024-09-16 | CVE Terms of Use |
| NVD | CVE-2022-31627 changed 2026-06-17 | Public domain |
| Bitnami Vulnerability Database | BIT-LIBPHP-2022-31627 changed 2026-09-08 | Apache-2.0 |
| Bitnami Vulnerability Database | BIT-PHP-2022-31627 changed 2026-09-08 | Apache-2.0 |
| Bitnami Vulnerability Database | BIT-PHP-MIN-2022-31627 changed 2026-09-08 | Apache-2.0 |