VDB

CVE-2022-31625

CVE-2022-31625 PUBLISHED CVSS 8.1 HIGH

Freeing unallocated memory in php_pgsql_free_params()

Reported by php · Published June 16, 2022

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.

Fixed versions

Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.

PackageEcosystemFixed in
php-mysqlndAmazon Linux5.4.16-46.amzn2.0.3
php7Alpine7.4.32-r0
php-soapAmazon Linux5.4.16-46.amzn2.0.3
php-odbcAmazon Linux5.4.16-46.amzn2.0.3
php-recodeAmazon Linux5.4.16-46.amzn2.0.3
php-dbaAmazon Linux5.4.16-46.amzn2.0.3
php-snmpAmazon Linux5.4.16-46.amzn2.0.3
php-pgsqlAmazon Linux5.4.16-46.amzn2.0.3
php8Alpine8.0.25-r0, 8.0.24-r0
phpAmazon Linux5.4.16-46.amzn2.0.3
php-xmlAmazon Linux5.4.16-46.amzn2.0.3
php-gdAmazon Linux5.4.16-46.amzn2.0.3

24 more packages have a fixed version. See every fix in Lookup.

Risk scores

CVSS 3.1
8.1
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

Affected products

VendorProductVersions
PHP GroupPHP7.4.X, 8.0.X, 8.1.X
PHP GroupPHP7.4.X, 8.1.X, 8.0.X
amazon:2php-mysqlnd0
alpinephp70
amazon:2php-soap0
amazon:2php-odbc0
amazon:2php-recode0
amazon:2php-dba0
amazon:2php-snmp0
amazon:2php-pgsql0
alpinephp80, 0
amazon:2php0
amazon:2php-xml0
amazon:2php-gd0
amazon:2php-intl0
amazon:2php-process0
amazon:2php-bcmath0
alpinephp810, 0
amazon:2php-embedded0
amazon:2php-common0

…and 10 more

Timeline

  • Jun 9, 2022 CVE Published
  • Jun 16, 2022 EPSS Score (30 in total, the first dated here)
  • Mar 10, 2026 Distribution Patch (12 in total, the first dated here)
  • Mar 10, 2026 Security Advisory (15 in total, the first dated here)
  • Jun 24, 2026 Coalition ESS Score

Query this with the API

The same record, from the CLI:

vulnetix vdb vuln CVE-2022-31625
vulnetix vdb fixes CVE-2022-31625

Or with curl, using the org id and key from your account page:

curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
  "https://api.vdb.vulnetix.com/v2/vuln/CVE-2022-31625/fixes/registry"

The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›