CVE-2022-31625
PHP vulnerability analysis and mitigation

Overview

CVE-2022-31625 affects PHP versions 7.4.x below 7.4.30, 8.0.x below 8.0.20, and 8.1.x below 8.1.7. The vulnerability exists in the Postgres database extension where supplying invalid parameters to the parametrized query may lead to PHP attempting to free memory using uninitialized data as pointers (CVE-MITRE, NVD).

Technical details

The vulnerability occurs in the pg_query_params() function when using the Postgres database extension. When invalid parameters are supplied to the parametrized query, PHP attempts to free memory using uninitialized data as pointers. The issue stems from an uninitialized array in the function implementation. The vulnerability has been assigned a CVSS v3.1 base score of 9.8 (CRITICAL) with attack vector Network, attack complexity Low, and no privileges or user interaction required (NetApp Advisory).

Impact

Successful exploitation of this vulnerability could lead to Remote Code Execution (RCE) or Denial of Service (DoS) conditions (CVE-MITRE, Debian Advisory).

Exploitability

The vulnerability requires network access and can be exploited by supplying invalid parameters to the parametrized query function. No user interaction or special privileges are required for exploitation (NetApp Advisory).

Mitigation and workarounds

The vulnerability has been fixed in PHP versions 7.4.30, 8.0.20, and 8.1.7. Users are advised to upgrade to these or later versions. The fix involves properly initializing the array in pg_query_params() function (PHP Bug, Debian Advisory).

Additional resources


SourceThis report was generated using AI

Related PHP vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-77143HIGH8.8
  • PHP logoPHP
  • composer://jweiland/pforum
NoYesAug 25, 2026
CVE-2026-77142HIGH8.8
  • PHP logoPHP
  • composer://jweiland/yellowpages2
NoYesAug 25, 2026
CVE-2026-77146HIGH8.3
  • PHP logoPHP
  • composer://in2code/femanager
NoYesAug 25, 2026
CVE-2026-77145HIGH7.1
  • PHP logoPHP
  • composer://jweiland/events2
NoYesAug 25, 2026
CVE-2026-77144HIGH7.1
  • PHP logoPHP
  • composer://jweiland/events2
NoYesAug 25, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management