Vulnerability · Published Jun 16, 2022 · Assigned by php

CVE-2022-31625Freeing unallocated memory in php_pgsql_free_params()

High 8.1

In plain English

A high-severity security flaw in PHP from PHP Group. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 3.8% (higher than 90% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)8.1High
Exploit odds (30 days)3.8%top 10.0% of all CVEs
Exploited in the wildNo reportsnot in CISA KEV
Attack toolingNoneno public tooling known

Official 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.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
AlmaLinux:8apcu-panel5.1.20-1.module_el8.6.0+2739+efabdb8fALSA-2022:7624
AlmaLinux:8apcu-panel5.1.18-1.module_el8.6.0+2750+78feabcbALSA-2022:6158
AlmaLinux:8libzip1.7.3-1.module_el8.6.0+2739+efabdb8fALSA-2022:7624
AlmaLinux:8libzip1.7.3-1.module_el8.6.0+3061+6878dd1bALSA-2022:7624
AlmaLinux:8libzip1.6.1-1.module_el8.6.0+2750+78feabcbALSA-2022:6158
AlmaLinux:8libzip-devel1.6.1-1.module_el8.6.0+2750+78feabcbALSA-2022:6158
AlmaLinux:8libzip-devel1.7.3-1.module_el8.6.0+2739+efabdb8fALSA-2022:7624
AlmaLinux:8libzip-devel1.7.3-1.module_el8.6.0+3061+6878dd1bALSA-2022:7624
AlmaLinux:8libzip-tools1.7.3-1.module_el8.6.0+2739+efabdb8fALSA-2022:7624
AlmaLinux:8libzip-tools1.7.3-1.module_el8.6.0+3061+6878dd1bALSA-2022:7624
AlmaLinux:8libzip-tools1.6.1-1.module_el8.6.0+2750+78feabcbALSA-2022:6158
AlmaLinux:8php7.4.19-4.module_el8.6.0+3238+624bf8b8ALSA-2022:6158
AlmaLinux:8php8.0.20-2.module_el8.7.0+3286+6cee236eALSA-2022:7624
AlmaLinux:9php8.0.20-3.el9ALSA-2022:8197
AlmaLinux:8php-bcmath7.4.19-4.module_el8.6.0+3238+624bf8b8ALSA-2022:6158
AlmaLinux:8php-bcmath8.0.20-2.module_el8.7.0+3286+6cee236eALSA-2022:7624
AlmaLinux:9php-bcmath8.0.20-3.el9ALSA-2022:8197
AlmaLinux:8php-cli7.4.19-4.module_el8.6.0+3238+624bf8b8ALSA-2022:6158
AlmaLinux:8php-cli8.0.20-2.module_el8.7.0+3286+6cee236eALSA-2022:7624
AlmaLinux:9php-cli8.0.20-3.el9ALSA-2022:8197
AlmaLinux:8php-common7.4.19-4.module_el8.6.0+3238+624bf8b8ALSA-2022:6158
AlmaLinux:8php-common8.0.20-2.module_el8.7.0+3286+6cee236eALSA-2022:7624
AlmaLinux:9php-common8.0.20-3.el9ALSA-2022:8197
AlmaLinux:8php-dba8.0.20-2.module_el8.7.0+3286+6cee236eALSA-2022:7624
AlmaLinux:8php-dba7.4.19-4.module_el8.6.0+3238+624bf8b8ALSA-2022:6158
AlmaLinux:9php-dba8.0.20-3.el9ALSA-2022:8197
AlmaLinux:8php-dbg8.0.20-2.module_el8.7.0+3286+6cee236eALSA-2022:7624
AlmaLinux:8php-dbg7.4.19-4.module_el8.6.0+3238+624bf8b8ALSA-2022:6158
AlmaLinux:9php-dbg8.0.20-3.el9ALSA-2022:8197
AlmaLinux:8php-devel8.0.20-2.module_el8.7.0+3286+6cee236eALSA-2022:7624
AlmaLinux:8php-devel7.4.19-4.module_el8.6.0+3238+624bf8b8ALSA-2022:6158
AlmaLinux:9php-devel8.0.20-3.el9ALSA-2022:8197
AlmaLinux:8php-embedded8.0.20-2.module_el8.7.0+3286+6cee236eALSA-2022:7624
AlmaLinux:8php-embedded7.4.19-4.module_el8.6.0+3238+624bf8b8ALSA-2022:6158
AlmaLinux:9php-embedded8.0.20-3.el9ALSA-2022:8197
AlmaLinux:8php-enchant8.0.20-2.module_el8.7.0+3286+6cee236eALSA-2022:7624
AlmaLinux:8php-enchant7.4.19-4.module_el8.6.0+3238+624bf8b8ALSA-2022:6158
AlmaLinux:9php-enchant8.0.20-3.el9ALSA-2022:8197
AlmaLinux:8php-ffi8.0.20-2.module_el8.7.0+3286+6cee236eALSA-2022:7624
AlmaLinux:8php-ffi7.4.19-4.module_el8.6.0+3238+624bf8b8ALSA-2022:6158
AlmaLinux:9php-ffi8.0.20-3.el9ALSA-2022:8197
AlmaLinux:8php-fpm7.4.19-4.module_el8.6.0+3238+624bf8b8ALSA-2022:6158
AlmaLinux:8php-fpm8.0.20-2.module_el8.7.0+3286+6cee236eALSA-2022:7624
AlmaLinux:9php-fpm8.0.20-3.el9ALSA-2022:8197
AlmaLinux:8php-gd7.4.19-4.module_el8.6.0+3238+624bf8b8ALSA-2022:6158
AlmaLinux:8php-gd8.0.20-2.module_el8.7.0+3286+6cee236eALSA-2022:7624
AlmaLinux:9php-gd8.0.20-3.el9ALSA-2022:8197
AlmaLinux:8php-gmp7.4.19-4.module_el8.6.0+3238+624bf8b8ALSA-2022:6158
AlmaLinux:8php-gmp8.0.20-2.module_el8.7.0+3286+6cee236eALSA-2022:7624
AlmaLinux:9php-gmp8.0.20-3.el9ALSA-2022:8197
AlmaLinux:8php-intl8.0.20-2.module_el8.7.0+3286+6cee236eALSA-2022:7624
AlmaLinux:8php-intl7.4.19-4.module_el8.6.0+3238+624bf8b8ALSA-2022:6158
AlmaLinux:9php-intl8.0.20-3.el9ALSA-2022:8197
AlmaLinux:8php-json7.4.19-4.module_el8.6.0+3238+624bf8b8ALSA-2022:6158
AlmaLinux:8php-ldap7.4.19-4.module_el8.6.0+3238+624bf8b8ALSA-2022:6158
AlmaLinux:8php-ldap8.0.20-2.module_el8.7.0+3286+6cee236eALSA-2022:7624
AlmaLinux:9php-ldap8.0.20-3.el9ALSA-2022:8197
AlmaLinux:8php-mbstring7.4.19-4.module_el8.6.0+3238+624bf8b8ALSA-2022:6158
AlmaLinux:8php-mbstring8.0.20-2.module_el8.7.0+3286+6cee236eALSA-2022:7624
AlmaLinux:9php-mbstring8.0.20-3.el9ALSA-2022:8197
AlmaLinux:8php-mysqlnd7.4.19-4.module_el8.6.0+3238+624bf8b8ALSA-2022:6158
AlmaLinux:8php-mysqlnd8.0.20-2.module_el8.7.0+3286+6cee236eALSA-2022:7624
AlmaLinux:9php-mysqlnd8.0.20-3.el9ALSA-2022:8197
AlmaLinux:8php-odbc8.0.20-2.module_el8.7.0+3286+6cee236eALSA-2022:7624
AlmaLinux:8php-odbc7.4.19-4.module_el8.6.0+3238+624bf8b8ALSA-2022:6158
AlmaLinux:9php-odbc8.0.20-3.el9ALSA-2022:8197
AlmaLinux:8php-opcache8.0.20-2.module_el8.7.0+3286+6cee236eALSA-2022:7624
AlmaLinux:8php-opcache7.4.19-4.module_el8.6.0+3238+624bf8b8ALSA-2022:6158
AlmaLinux:9php-opcache8.0.20-3.el9ALSA-2022:8197
AlmaLinux:8php-pdo8.0.20-2.module_el8.7.0+3286+6cee236eALSA-2022:7624
AlmaLinux:8php-pdo7.4.19-4.module_el8.6.0+3238+624bf8b8ALSA-2022:6158
AlmaLinux:9php-pdo8.0.20-3.el9ALSA-2022:8197
AlmaLinux:8php-pear1:1.10.13-1.module_el8.6.0+2739+efabdb8fALSA-2022:7624
AlmaLinux:8php-pear1:1.10.12-1.module_el8.6.0+2750+78feabcbALSA-2022:6158
AlmaLinux:8php-pear1:1.10.13-1.module_el8.6.0+3061+6878dd1bALSA-2022:7624
AlmaLinux:8php-pecl-apcu5.1.18-1.module_el8.6.0+2750+78feabcbALSA-2022:6158
AlmaLinux:8php-pecl-apcu5.1.20-1.module_el8.6.0+3061+6878dd1bALSA-2022:7624
AlmaLinux:8php-pecl-apcu5.1.20-1.module_el8.6.0+2739+efabdb8fALSA-2022:7624
AlmaLinux:8php-pecl-apcu-devel5.1.20-1.module_el8.6.0+2739+efabdb8fALSA-2022:7624
AlmaLinux:8php-pecl-apcu-devel5.1.18-1.module_el8.6.0+2750+78feabcbALSA-2022:6158
AlmaLinux:8php-pecl-apcu-devel5.1.20-1.module_el8.6.0+3061+6878dd1bALSA-2022:7624
AlmaLinux:8php-pecl-rrd2.0.3-1.module_el8.6.0+3061+6878dd1bALSA-2022:7624
AlmaLinux:8php-pecl-rrd2.0.3-1.module_el8.6.0+2739+efabdb8fALSA-2022:7624
AlmaLinux:8php-pecl-rrd2.0.1-1.module_el8.6.0+2750+78feabcbALSA-2022:6158
AlmaLinux:8php-pecl-xdebug2.9.5-1.module_el8.6.0+2750+78feabcbALSA-2022:6158
AlmaLinux:8php-pecl-xdebug33.1.2-1.module_el8.6.0+3061+6878dd1bALSA-2022:7624
AlmaLinux:8php-pecl-xdebug33.1.2-1.module_el8.6.0+2739+efabdb8fALSA-2022:7624
AlmaLinux:8php-pecl-zip1.18.2-1.module_el8.6.0+2750+78feabcbALSA-2022:6158
AlmaLinux:8php-pecl-zip1.19.2-1.module_el8.6.0+3061+6878dd1bALSA-2022:7624
AlmaLinux:8php-pecl-zip1.19.2-1.module_el8.6.0+2739+efabdb8fALSA-2022:7624
AlmaLinux:8php-pgsql8.0.20-2.module_el8.7.0+3286+6cee236eALSA-2022:7624
AlmaLinux:8php-pgsql7.4.19-4.module_el8.6.0+3238+624bf8b8ALSA-2022:6158
AlmaLinux:9php-pgsql8.0.20-3.el9ALSA-2022:8197
AlmaLinux:8php-process7.4.19-4.module_el8.6.0+3238+624bf8b8ALSA-2022:6158
AlmaLinux:8php-process8.0.20-2.module_el8.7.0+3286+6cee236eALSA-2022:7624
AlmaLinux:9php-process8.0.20-3.el9ALSA-2022:8197
AlmaLinux:8php-snmp7.4.19-4.module_el8.6.0+3238+624bf8b8ALSA-2022:6158
AlmaLinux:8php-snmp8.0.20-2.module_el8.7.0+3286+6cee236eALSA-2022:7624
AlmaLinux:9php-snmp8.0.20-3.el9ALSA-2022:8197
AlmaLinux:8php-soap8.0.20-2.module_el8.7.0+3286+6cee236eALSA-2022:7624
AlmaLinux:8php-soap7.4.19-4.module_el8.6.0+3238+624bf8b8ALSA-2022:6158
AlmaLinux:9php-soap8.0.20-3.el9ALSA-2022:8197
AlmaLinux:8php-xml8.0.20-2.module_el8.7.0+3286+6cee236eALSA-2022:7624
AlmaLinux:8php-xml7.4.19-4.module_el8.6.0+3238+624bf8b8ALSA-2022:6158
AlmaLinux:9php-xml8.0.20-3.el9ALSA-2022:8197
AlmaLinux:8php-xmlrpc7.4.19-4.module_el8.6.0+3238+624bf8b8ALSA-2022:6158
Rocky Linux:8libzip0:1.7.3-1.module+el8.6.0+790+fc63e43fRLSA-2022:7624
Rocky Linux:8libzip0:1.6.1-1.module+el8.6.0+789+2130c178RLSA-2022:6158
Rocky Linux:8libzip0:1.6.1-1.module+el8.4.0+415+e936cba3RLSA-2022:6158
Rocky Linux:8php0:8.0.20-2.module+el8.7.0+1068+7fd2c980RLSA-2022:7624
Rocky Linux:8php0:7.4.19-4.module+el8.6.0+1006+0d5a469fRLSA-2022:6158
Rocky Linux:9php0:8.0.20-3.el9RLSA-2022:8197
Rocky Linux:8php-pear1:1.10.12-1.module+el8.6.0+789+2130c178RLSA-2022:6158
Rocky Linux:8php-pear1:1.10.12-1.module+el8.4.0+415+e936cba3RLSA-2022:6158
Rocky Linux:8php-pear1:1.10.13-1.module+el8.7.0+1067+0a7071ccRLSA-2022:7624
Rocky Linux:8php-pear1:1.10.13-1.module+el8.6.0+1006+0d5a469fRLSA-2022:7624
Rocky Linux:8php-pecl-apcu0:5.1.20-1.module+el8.6.0+790+fc63e43fRLSA-2022:7624
Rocky Linux:8php-pecl-apcu0:5.1.18-1.module+el8.4.0+415+e936cba3RLSA-2022:6158
Rocky Linux:8php-pecl-apcu0:5.1.18-1.module+el8.6.0+789+2130c178RLSA-2022:6158
Rocky Linux:8php-pecl-rrd0:2.0.1-1.module+el8.4.0+414+2e7afcddRLSA-2022:6158
Rocky Linux:8php-pecl-rrd0:2.0.3-1.module+el8.6.0+790+fc63e43fRLSA-2022:7624
Rocky Linux:8php-pecl-xdebug0:2.9.5-1.module+el8.4.0+415+e936cba3RLSA-2022:6158
Rocky Linux:8php-pecl-xdebug30:3.1.2-1.module+el8.6.0+790+fc63e43fRLSA-2022:7624
Rocky Linux:8php-pecl-zip0:1.18.2-1.module+el8.6.0+789+2130c178RLSA-2022:6158
Rocky Linux:8php-pecl-zip0:1.19.2-1.module+el8.6.0+790+fc63e43fRLSA-2022:7624
Rocky Linux:8php-pecl-zip0:1.18.2-1.module+el8.4.0+415+e936cba3RLSA-2022:6158
Ubuntu:22.04:LTSphp8.18.1.2-1ubuntu2.1USN-5479-1
Ubuntu:22.04:LTSphp8.18.1.2-1ubuntu2.1UBUNTU-CVE-2022-31625

Affected products (as reported)

VendorProductVersions
PHP Group PHP 7.4.X – before 7.4.308.0.X – before 8.0.208.1.X – before 8.1.7

Weakness: CWE-590, CWE-824 · Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

References