CVE-2022-31625
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.
| Package | Ecosystem | Fixed in |
|---|---|---|
| php-mysqlnd | Amazon Linux | 5.4.16-46.amzn2.0.3 |
| php7 | Alpine | 7.4.32-r0 |
| php-soap | Amazon Linux | 5.4.16-46.amzn2.0.3 |
| php-odbc | Amazon Linux | 5.4.16-46.amzn2.0.3 |
| php-recode | Amazon Linux | 5.4.16-46.amzn2.0.3 |
| php-dba | Amazon Linux | 5.4.16-46.amzn2.0.3 |
| php-snmp | Amazon Linux | 5.4.16-46.amzn2.0.3 |
| php-pgsql | Amazon Linux | 5.4.16-46.amzn2.0.3 |
| php8 | Alpine | 8.0.25-r0, 8.0.24-r0 |
| php | Amazon Linux | 5.4.16-46.amzn2.0.3 |
| php-xml | Amazon Linux | 5.4.16-46.amzn2.0.3 |
| php-gd | Amazon Linux | 5.4.16-46.amzn2.0.3 |
24 more packages have a fixed version. See every fix in Lookup.
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| PHP Group | PHP | 7.4.X, 8.0.X, 8.1.X |
| PHP Group | PHP | 7.4.X, 8.1.X, 8.0.X |
| amazon:2 | php-mysqlnd | 0 |
| alpine | php7 | 0 |
| amazon:2 | php-soap | 0 |
| amazon:2 | php-odbc | 0 |
| amazon:2 | php-recode | 0 |
| amazon:2 | php-dba | 0 |
| amazon:2 | php-snmp | 0 |
| amazon:2 | php-pgsql | 0 |
| alpine | php8 | 0, 0 |
| amazon:2 | php | 0 |
| amazon:2 | php-xml | 0 |
| amazon:2 | php-gd | 0 |
| amazon:2 | php-intl | 0 |
| amazon:2 | php-process | 0 |
| amazon:2 | php-bcmath | 0 |
| alpine | php81 | 0, 0 |
| amazon:2 | php-embedded | 0 |
| amazon:2 | php-common | 0 |
…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
References
- FEDORA-2022-0a96e5b9b1 vendor-advisory
- FEDORA-2022-f3fc52428e vendor-advisory
- DSA-5179 vendor-advisory
- GLSA-202209-20 vendor-advisory
- [debian-lts-announce] 20221215 [SECURITY] [DLA 3243-1] php7.3 security update mailing-list