CVE-2022-31626
mysqlnd/pdo password buffer overflow
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 pdo_mysql extension with mysqlnd driver, if the third party is allowed to supply host to connect to and the password for the connection, password of excessive length can trigger a buffer overflow in PHP, which can lead to a remote code execution vulnerability.
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 | Arch Linux | 8.1.7-1 |
| php8 | Alpine | 8.0.25-r0, 8.0.24-r0 |
| php81 | Alpine | 8.1.7-r0, 8.1.6-r2 |
| libphp | Bitnami | 8.1.7, 8.0.20, 7.4.30 |
| php | Bitnami | 8.1.7, 8.0.20, 7.4.30 |
| php-min | Bitnami | 8.1.7, 8.0.20, 7.4.30 |
| php7 | Alpine | 7.4.32-r0 |
| PHP | PHP Group | 8.1.7, 8.0.20, 7.4.30 |
| php | php | 8.1.7, 8.0.20, 7.4.30 |
| php-min | Bitnami | 8.1.7, 8.0.20, 7.4.30 |
| libphp | Bitnami | 8.1.7, 8.0.20, 7.4.30 |
| php | Bitnami | 8.1.7, 8.0.20, 7.4.30 |
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| PHP Group | PHP | 7.4.X, 8.0.X, 8.1.X |
| arch | php | 0 |
| alpine | php8 | 0, 0 |
| PHP Group | PHP | 7.4.X, 8.0.X, 8.1.X |
| alpine | php81 | 0, 0 |
| alpine | php7 | 0 |
Timeline
- Jun 9, 2022 CVE Published
- Jun 16, 2022 EPSS Score (30 in total, the first dated here)
- Sep 17, 2024 CVE Updated
- 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-31626
vulnetix vdb fixes CVE-2022-31626
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-31626/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