PHP up to 8.1.7 libmagic finfo_buffer free of memory not on the heap
|CVSS Meta Temp Score|
CVSS is a standardized scoring system to determine possibilities of attacks. The Temp Score considers temporal factors like disclosure, exploit and countermeasures. The unique Meta Score calculates the average score of different sources to provide a normalized scoring system.
|Current Exploit Price (≈)|
Our analysts are monitoring exploit markets and are in contact with vulnerability brokers. The range indicates the observed or calculated exploit price to be seen on exploit markets. A good indicator to understand the monetary effort required for and the popularity of an attack.
|CTI Interest Score|
Our Cyber Threat Intelligence team is monitoring different web sites, mailing lists, exploit markets and social media networks. The CTI Interest Score identifies the interest of attackers and the security community for this specific vulnerability in real-time. A high score indicates an elevated risk to be targeted for this vulnerability.
A vulnerability was found in PHP up to 8.1.7 (Programming Language Software). It has been declared as critical. Affected by this vulnerability is the function
finfo_buffer of the component libmagic. The CWE definition for the vulnerability is CWE-590. The application calls free() on a pointer to memory that was not allocated using associated heap allocation functions such as malloc(), calloc(), or realloc(). As an impact it is known to affect confidentiality, integrity, and availability. The summary by CVE is:
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.
The weakness was presented 07/28/2022 as 81723. It is possible to read the advisory at bugs.php.net. This vulnerability is known as CVE-2022-31627 since 05/25/2022. Technical details of the vulnerability are known, but there is no available exploit. The pricing for an exploit might be around USD $0-$5k at the moment (estimation calculated on 08/28/2022).
Upgrading to version 8.1.8 eliminates this vulnerability.
CVSSv3VulDB Meta Base Score: 8.5
VulDB Meta Temp Score: 8.4
VulDB Base Score: 8.1
VulDB Temp Score: 7.7
VulDB Vector: 🔒
VulDB Reliability: 🔍
NVD Base Score: 9.8
NVD Vector: 🔒
CNA Base Score: 7.7
CNA Vector (PHP Group): 🔒
VulDB Base Score: 🔒
VulDB Temp Score: 🔒
VulDB Reliability: 🔍
ExploitingClass: Remote Code Execution
Status: Not defined
EPSS Score: 🔒
EPSS Percentile: 🔒
Price Prediction: 🔍
Current Price Estimation: 🔒
Threat IntelligenceInterest: 🔍
Active Actors: 🔍
Active APT Groups: 🔍
0-Day Time: 🔒
Upgrade: PHP 8.1.8
Timeline05/25/2022 CVE reserved
07/28/2022 +64 days Advisory disclosed
07/28/2022 +0 days VulDB entry created
08/28/2022 +31 days VulDB last update
CVE: CVE-2022-31627 (🔒)
EntryCreated: 07/28/2022 01:51 PM
Updated: 08/28/2022 09:46 AM
Changes: (11) vulnerability_cvss3_meta_basescore vulnerability_cvss3_meta_tempscore vulnerability_cvss3_nvd_basescore vulnerability_cvss3_nvd_av vulnerability_cvss3_nvd_ac vulnerability_cvss3_nvd_pr vulnerability_cvss3_nvd_ui vulnerability_cvss3_nvd_s vulnerability_cvss3_nvd_c vulnerability_cvss3_nvd_i vulnerability_cvss3_nvd_a
Are you interested in using VulDB?
Download the whitepaper to learn more about our service!