CVE & CISA-KEV Catalog

CVE-2022-31625

HIGHEPSS 89th pctl
8.1
CVSS v3
NVD

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.

How to fix

Remediation Available
phpAmazon
Fixed in:0:5.4.16-46.amzn2.0.3
Fixed in:0:5.4.16-46.amzn2.0.3
Fixed in:0:5.4.16-46.amzn2.0.3
php-bcmathAmazon
Fixed in:0:5.4.16-46.amzn2.0.3
Fixed in:0:5.4.16-46.amzn2.0.3
Fixed in:0:5.4.16-46.amzn2.0.3
php-cliAmazon
Fixed in:0:5.4.16-46.amzn2.0.3
Fixed in:0:5.4.16-46.amzn2.0.3
Fixed in:0:5.4.16-46.amzn2.0.3
php-commonAmazon
Fixed in:0:5.4.16-46.amzn2.0.3
Fixed in:0:5.4.16-46.amzn2.0.3
Fixed in:0:5.4.16-46.amzn2.0.3
php-dbaAmazon
Fixed in:0:5.4.16-46.amzn2.0.3
Fixed in:0:5.4.16-46.amzn2.0.3
Fixed in:0:5.4.16-46.amzn2.0.3
php-debuginfoAmazon
Fixed in:0:5.4.16-46.amzn2.0.3
Fixed in:0:5.4.16-46.amzn2.0.3
Fixed in:0:5.4.16-46.amzn2.0.3
php-develAmazon
Fixed in:0:5.4.16-46.amzn2.0.3
Fixed in:0:5.4.16-46.amzn2.0.3
Fixed in:0:5.4.16-46.amzn2.0.3
php-embeddedAmazon
Fixed in:0:5.4.16-46.amzn2.0.3
Fixed in:0:5.4.16-46.amzn2.0.3
Fixed in:0:5.4.16-46.amzn2.0.3
php-enchantAmazon
Fixed in:0:5.4.16-46.amzn2.0.3
Fixed in:0:5.4.16-46.amzn2.0.3
Fixed in:0:5.4.16-46.amzn2.0.3
php-fpmAmazon
Fixed in:0:5.4.16-46.amzn2.0.3
Fixed in:0:5.4.16-46.amzn2.0.3
Fixed in:0:5.4.16-46.amzn2.0.3
php-gdAmazon
Fixed in:0:5.4.16-46.amzn2.0.3
Fixed in:0:5.4.16-46.amzn2.0.3
Fixed in:0:5.4.16-46.amzn2.0.3
php-intlAmazon
Fixed in:0:5.4.16-46.amzn2.0.3
Fixed in:0:5.4.16-46.amzn2.0.3
Fixed in:0:5.4.16-46.amzn2.0.3
php-ldapAmazon
Fixed in:0:5.4.16-46.amzn2.0.3
Fixed in:0:5.4.16-46.amzn2.0.3
Fixed in:0:5.4.16-46.amzn2.0.3
php-mbstringAmazon
Fixed in:0:5.4.16-46.amzn2.0.3
Fixed in:0:5.4.16-46.amzn2.0.3
Fixed in:0:5.4.16-46.amzn2.0.3
php-mysqlndAmazon
Fixed in:0:5.4.16-46.amzn2.0.3
Fixed in:0:5.4.16-46.amzn2.0.3
Fixed in:0:5.4.16-46.amzn2.0.3
php-odbcAmazon
Fixed in:0:5.4.16-46.amzn2.0.3
Fixed in:0:5.4.16-46.amzn2.0.3
Fixed in:0:5.4.16-46.amzn2.0.3
php-pdoAmazon
Fixed in:0:5.4.16-46.amzn2.0.3
Fixed in:0:5.4.16-46.amzn2.0.3
Fixed in:0:5.4.16-46.amzn2.0.3
php-pgsqlAmazon
Fixed in:0:5.4.16-46.amzn2.0.3
Fixed in:0:5.4.16-46.amzn2.0.3
Fixed in:0:5.4.16-46.amzn2.0.3
php-processAmazon
Fixed in:0:5.4.16-46.amzn2.0.3
Fixed in:0:5.4.16-46.amzn2.0.3
Fixed in:0:5.4.16-46.amzn2.0.3
php-pspellAmazon
Fixed in:0:5.4.16-46.amzn2.0.3
Fixed in:0:5.4.16-46.amzn2.0.3
Fixed in:0:5.4.16-46.amzn2.0.3
php-recodeAmazon
Fixed in:0:5.4.16-46.amzn2.0.3
Fixed in:0:5.4.16-46.amzn2.0.3
Fixed in:0:5.4.16-46.amzn2.0.3
php-snmpAmazon
Fixed in:0:5.4.16-46.amzn2.0.3
Fixed in:0:5.4.16-46.amzn2.0.3
Fixed in:0:5.4.16-46.amzn2.0.3
php-soapAmazon
Fixed in:0:5.4.16-46.amzn2.0.3
Fixed in:0:5.4.16-46.amzn2.0.3
Fixed in:0:5.4.16-46.amzn2.0.3
php-xmlAmazon
Fixed in:0:5.4.16-46.amzn2.0.3
Fixed in:0:5.4.16-46.amzn2.0.3
Fixed in:0:5.4.16-46.amzn2.0.3
php-xmlrpcAmazon
Fixed in:0:5.4.16-46.amzn2.0.3
Fixed in:0:5.4.16-46.amzn2.0.3
Fixed in:0:5.4.16-46.amzn2.0.3
php7.4Debian
Fixed in:7.4.30-1+deb11u1CVE-2022-31625

This Debian release reached end-of-life on 2024-08-14.

libapache2-mod-php7.0Ubuntu
Fixed in:7.0.33-0ubuntu0.16.04.16+esm4USN-5479-2

This Ubuntu release reached end-of-life on 2021-04-02.

libapache2-mod-php7.2Ubuntu
Fixed in:7.2.24-0ubuntu0.18.04.12USN-5479-1

This Ubuntu release reached end-of-life on 2023-05-31. Extended security maintenance is available until 2028-04-01.

Fixed in:7.2.24-0ubuntu0.18.04.13USN-5479-3

This Ubuntu release reached end-of-life on 2023-05-31. Extended security maintenance is available until 2028-04-01.

libapache2-mod-php7.4Ubuntu
Fixed in:7.4.3-4ubuntu2.12USN-5479-1

This Ubuntu release reached end-of-life on 2025-05-31. Extended security maintenance is available until 2030-04-02.

libapache2-mod-php8.1Ubuntu
Fixed in:8.1.2-1ubuntu2.1USN-5479-1

This vulnerability affects an unusually large number of packages. The highest-confidence fixes are shown above; the full list is longer. Check the referenced advisories for complete coverage.

TridentStack Control can deploy fixes like this automatically across your Windows, macOS, and Linux fleet. See how it works

Remediation is compiled from vendor and distribution security advisories. Always confirm against the linked source for your exact version and platform.

CVSS v3 Vector

Exploitability

Attack VectorNetwork
Attack ComplexityHigh
Privileges RequiredNone
User InteractionNone
ScopeUnchanged

Impact

ConfidentialityHigh
IntegrityHigh
AvailabilityHigh

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

Exploit Intelligence

3.79%probability of exploitation in 30 days
89thpercentile

Elevated risk: more likely to be exploited than 89% of all known CVEs.

References

Related Vulnerabilities

Other CWE-590 vulnerabilities, ordered by exploit likelihood. View all

CVESeverityCVSSEPSSExploitedFix
CVE-2020-6016Critical9.86.0%-Fix
CVE-2021-42377Critical9.83.6%-Fix
CVE-2022-31627High7.72.0%-Fix
CVE-2023-25565High7.51.1%-Fix
CVE-2025-32911Critical9.00.9%-Fix
CVE-2023-42459High8.60.8%-Fix

Common questions

How do I fix CVE-2022-31625?

Published advisories record a fix for 54 affected products. The "How to fix" section on this page lists the fixed version and source advisory for each one, so apply the entry matching what you actually run.

Is CVE-2022-31625 being actively exploited?

Not that we know of. CVE-2022-31625 is not in the CISA Known Exploited Vulnerabilities catalog. Its EPSS score of 3.8% is the estimated probability that it will be exploited in the next 30 days. That is higher than 89% of all scored CVEs.

How severe is CVE-2022-31625?

CVE-2022-31625 has a CVSS v3 base score of 8.1, rated high. CVSS rates the technical impact if the vulnerability is exploited, not how likely that is, so weigh it alongside the exploit-prediction score when you decide what to patch first.

What does CVE-2022-31625 affect?

Published advisories record a fix for php (Amazon), php-bcmath (Amazon), php-cli (Amazon), php-common (Amazon), and 50 more. Only products with a sourced advisory are listed, so treat this as what we can cite rather than a complete inventory.

Embed a live status badge for CVE-2022-31625
CVE-2022-31625 severity badge

Markdown

[![CVE-2022-31625](https://tridentstack.com/cve/badge/CVE-2022-31625.svg)](https://tridentstack.com/cve/CVE-2022-31625)

HTML

<a href="https://tridentstack.com/cve/CVE-2022-31625"><img src="https://tridentstack.com/cve/badge/CVE-2022-31625.svg" alt="CVE-2022-31625"></a>

Check your Linux endpoints for this class of vulnerability

TridentStack Control continuously scans Linux endpoints for known vulnerabilities and deploys the fixes from the same console. 200 endpoints free forever, no credit card.

Patch your fleet freeStart freeThis CVE lookup is free and always will be.

This product uses NVD data but is not endorsed or certified by the NVD. EPSS scores courtesy of FIRST.org (https://www.first.org/epss). Source: CISA KEV Catalog. Data as of 2026-06-17.