CVE-2022-31625: Freeing unallocated memory in php_pgsql_free_params()
Vulnerability summary
CVE-2022-31625 is a high (CVSS 8.1) Free of Memory not on the Heap vulnerability in debian debian_linux. EPSS estimates a 3.79% chance of exploitation in the next 30 days, higher than 89.9% of scored vulnerabilities. 1 public exploit is recorded.
Public exploit (reference, Date unknown)
Source freshness unavailable
How is this decided?Advisory lineage
Upstream 0 · Downstream 19 · Related 13Timeline
- 16-06-2022PublishedVulnerability first disclosed.
- 16-09-2024Last modifiedVulnerability information updated.
Description
In PHP versions 7.4.x below 7.4.30, 8.0.x below 8.0.20, and 8.1.x below 8.1.7, when using Postgres database extension, supplying invalid parameters to the parametrized query may lead to PHP attempting to free memory using uninitialized data as pointers. This could lead to RCE vulnerability or denial of service.
CVSS metrics
7 scores · 6 sources · 2 versions- OSV · Red hatEcosystem advisory · calculated7.0HighCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:HDiffers
- OSV · UbuntuEcosystem advisory · calculated8.1HighCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
- OSV · DebianEcosystem advisory · calculated8.1HighCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
- NVDNIST8.1HighCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
- OSV · AlpineEcosystem advisory · calculated8.1HighCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS trend
Probability
3.79%
Chance of exploitation in the next 30 days
Percentile
90%
Versus all other CVEs
30-day change
No change 0.00 pp
From 3.79% on 04-10-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
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-824Access of Uninitialized PointerThe product accesses or uses a pointer that has not been initialized.
- CWE-763Release of Invalid Pointer or ReferenceThe product attempts to return a memory resource to the system, but it calls the wrong release function or calls the appropriate release function incorrectly.
Affected systems
Known conditions: network-reachable, no authentication, no user interaction (CVSS vector). Other conditions: not stated in public data.
Redhat75 products
- apcu-panel< 0:5.1.18-1.module+el8.3.0+6678+b09f589e
- libzip< 0:1.6.1-1.module+el8.3.0+6678+b09f589e
- libzip-debuginfo< 0:1.6.1-1.module+el8.3.0+6678+b09f589e
- libzip-debugsource< 0:1.6.1-1.module+el8.3.0+6678+b09f589e
- libzip-devel< 0:1.6.1-1.module+el8.3.0+6678+b09f589e
Ubuntu5 products
- php5All versions (No fix recorded)
- php7.0< 7.0.33-0ubuntu0.16.04.16+esm4
- php7.2< 7.2.24-0ubuntu0.18.04.13 | < 7.2.24-0ubuntu0.18.04.12
- php7.4< 7.4.3-4ubuntu2.12
- php8.1< 8.1.2-1ubuntu2.1
Alpine3 products
- php7< 7.4.32-r0
- php8< 8.0.24-r0 | < 8.0.25-r0
- php81< 8.1.7-r0 | < 8.1.6-r2
Debian2 products
- php7.4< 7.4.30-1+deb11u1
- debian_linuxEOL10.0 | 11.0
Php1 product
- php≥ 7.4.0, < 7.4.30 | ≥ 8.0.0, < 8.0.20 | ≥ 8.1.0, < 8.1.7
Php group1 product
- php≥ 7.4.X, < 7.4.30 | ≥ 8.0.X, < 8.0.20 | ≥ 8.1.X, < 8.1.7
6 vendors · 87 products
References
20 links- lists.fedoraproject.org/archives/…Vendor Advisory
- lists.fedoraproject.org/archives/…Vendor Advisory
- security.netapp.com/advisory/ntap-20220722-0005/Third Party Advisory