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

- Severity: High 8.1 (CVSS:3.1, scored by php) `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 3.79%, higher than 90% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2022-06-16T05:45:15.228Z
- Modified: 2026-09-08T08:48:24.631Z
- Also known as: BIT-LIBPHP-2022-31625, BIT-PHP-2022-31625, BIT-PHP-MIN-2022-31625
- Weaknesses: CWE-590, CWE-763, CWE-824
- Assigned by: php

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

(As written by CVE List.)

## Affected

- PHP Group PHP: from 7.4.X before 7.4.30; from 8.0.X before 8.0.20; from 8.1.X before 8.1.7
- php php: from 7.4.0 before 7.4.30; from 8.0.0 before 8.0.20; from 8.1.0 before 8.1.7
- debian debian_linux: 10.0; 11.0
- libphp (Bitnami): from 7.4.0 before 7.4.30; from 8.0.0 before 8.0.20; from 8.1.0 before 8.1.7
- php (Bitnami): from 7.4.0 before 7.4.30; from 8.0.0 before 8.0.20; from 8.1.0 before 8.1.7
- php-min (Bitnami): from 7.4.0 before 7.4.30; from 8.0.0 before 8.0.20; from 8.1.0 before 8.1.7

## Every score

- php: CVSS:3.1 8.1 High `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 8.1 High `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:2.0 6.8 Medium `AV:N/AC:M/Au:N/C:P/I:P/A:P`
- Bitnami Vulnerability Database: rating High

## References

- <https://bugs.php.net/bug.php?id=81720> (exploit, advisory, issue-tracking, mailing-list, patch, vendor-advisory)
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ZZTZQKRGEYJT5UB4FGG3MOE72SQUHSL4/> (vendor-advisory, web)
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/3T4MMEEZYYAEHPQMZDFN44PHORJWJFZQ/> (vendor-advisory, web)
- <https://www.debian.org/security/2022/dsa-5179> (advisory, third-party-advisory, vendor-advisory)
- <https://security.netapp.com/advisory/ntap-20220722-0005/> (advisory, third-party-advisory)
- <https://security.gentoo.org/glsa/202209-20> (advisory, third-party-advisory, vendor-advisory)
- <https://lists.debian.org/debian-lts-announce/2022/12/msg00030.html> (advisory, mailing-list, third-party-advisory)
- <https://nvd.nist.gov/vuln/detail/CVE-2022-31625> (web)

## Sources

- CVE List: [CVE-2022-31625](https://www.cve.org/CVERecord?id=CVE-2022-31625), CVE Terms of Use, modified 2024-09-16
- NVD: [CVE-2022-31625](https://nvd.nist.gov/vuln/detail/CVE-2022-31625), Public domain, modified 2026-06-17
- Bitnami Vulnerability Database: [BIT-LIBPHP-2022-31625](https://osv.dev/vulnerability/BIT-LIBPHP-2022-31625), Apache-2.0, modified 2026-09-08
- Bitnami Vulnerability Database: [BIT-PHP-2022-31625](https://osv.dev/vulnerability/BIT-PHP-2022-31625), Apache-2.0, modified 2026-09-08
- Bitnami Vulnerability Database: [BIT-PHP-MIN-2022-31625](https://osv.dev/vulnerability/BIT-PHP-MIN-2022-31625), Apache-2.0, modified 2026-09-08

---

Page: https://cve.day/CVE-2022-31625 · Whole record: https://cve.day/CVE-2022-31625.json · Rebuilt by cve.day 2026-11-25T22:58:12.416Z
