CVE-2022-31627: php_group php Free of Memory not on the Heap
CVSS: 9.8v3.1CriticalModified
AliasesUBUNTU-CVE-2022-31627USN-5530-1openSUSE-SU-2024:12218-1
Published 28-07-2022Last modified 16-09-2024
Vulnerability summary
CVE-2022-31627 is a critical (CVSS 9.8) Free of Memory not on the Heap vulnerability in php_group php. EPSS estimates a 2.14% chance of exploitation in the next 30 days, higher than 81.7% of scored vulnerabilities. 1 public exploit is recorded.
CVSS score
9.8/10
010
Critical · v3.1 (NVD)EPSS score
2.14%
0%100%
Low · +0.10 pp in 30 daysKEVNot listedIn no KEV catalog
RansomwareNone recordedNo known use recorded
Public exploits1reference
Timeline
- 28-07-2022PublishedVulnerability first disclosed.
- 16-09-2024Last modifiedVulnerability information updated.
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.
CVSS metrics
3 scores · 3 sources · 1 versionCritical 9.8Preferred score · NVD (NIST)
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:HSources3 sources · 7.7–9.8
- CVE.orgCNA7.7HighCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:LDiffers
- OSV · UbuntuEcosystem advisory · calculated7.7HighCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:LDiffers
EPSS trend
Probability
2.14%
Chance of exploitation in the next 30 days
Percentile
82%
Versus all other CVEs
30-day change
+0.10 pp
From 2.04% on 19-09-2026
19-09-202619-10-2026
EPSS score2.14%
Known exploited
Compare KEV catalogsNot in any of the 3 tracked catalogs.
Public exploits
1 foundExploit Reference (bugs.php.net)
Maturity: unknown
Weaknesses
CWE · root cause- CWE-590Free of Memory not on the HeapThe product calls free() on a pointer to memory that was not allocated using associated heap allocation functions such as malloc(), calloc(), or realloc().
- CWE-787Out-of-bounds WriteThe product writes data past the end, or before the beginning, of the intended buffer.
Affected systems
Opensuse1 product
- php8&distro=openSUSE Tumbleweed< 8.1.8-1.1
Php1 product
- php≥ 8.1.0, < 8.1.8
Php_group1 product
- php≥ 8.1.X, < 8.1.8
Ubuntu1 product
- php8.1< 8.1.2-1ubuntu2.2
4 vendors · 4 products