CVE-2022-31630
OOB read due to insufficient input validation in imageloadfont()
Reported by php · Published November 14, 2022
In PHP versions prior to 7.4.33, 8.0.25 and 8.1.12, when using imageloadfont() function in gd extension, it is possible to supply a specially crafted font file, such as if the loaded font is used with imagechar() function, the read outside allocated buffer will be used. This can lead to crashes or disclosure of confidential information.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| php8.1 | Amazon Linux | 8.1.14-1.amzn2023.0.2 |
| php81 | Alpine | 8.1.12-r0 |
| php8.1-pdo | Amazon Linux | 8.1.14-1.amzn2023.0.2 |
| php8.1-cli | Amazon Linux | 8.1.14-1.amzn2023.0.2 |
| php8 | Alpine | 8.0.25-r0 |
| php8.1-dba | Amazon Linux | 8.1.14-1.amzn2023.0.2 |
| php8.1-tidy | Amazon Linux | 8.1.14-1.amzn2023.0.2 |
| php8.1-gd | Amazon Linux | 8.1.14-1.amzn2023.0.2 |
| php8.1-intl | Amazon Linux | 8.1.14-1.amzn2023.0.2 |
| php8.1-ffi | Amazon Linux | 8.1.14-1.amzn2023.0.2 |
| php8.1-pgsql | Amazon Linux | 8.1.14-1.amzn2023.0.2 |
| php8.1-odbc | Amazon Linux | 8.1.14-1.amzn2023.0.2 |
25 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 |
| amazon:2023 | php8.1 | 0 |
| alpine | php81 | 0 |
| amazon:2023 | php8.1-pdo | 0 |
| amazon:2023 | php8.1-cli | 0 |
| alpine | php8 | 0 |
| amazon:2023 | php8.1-dba | 0 |
| amazon:2023 | php8.1-tidy | 0 |
| amazon:2023 | php8.1-gd | 0 |
| amazon:2023 | php8.1-intl | 0 |
| amazon:2023 | php8.1-ffi | 0 |
| amazon:2023 | php8.1-pgsql | 0 |
| amazon:2023 | php8.1-odbc | 0 |
| alpine | php82 | 0 |
| amazon:2023 | php8.1-xml | 0 |
| amazon:2023 | php8.1-common | 0 |
| amazon:2023 | php8.1-dbg | 0 |
| amazon:2023 | php8.1-embedded | 0 |
| amazon:2023 | php8.1-fpm | 0 |
| amazon:2023 | php8.1-ldap | 0 |
…and 11 more
Timeline
- Oct 31, 2022 CVE Published
- Nov 14, 2022 EPSS Score (30 in total, the first dated here)
- Jun 29, 2023 CVE Updated
- Jun 2, 2026 Security Advisory (6 in total, the first dated here)
- Jun 24, 2026 Coalition ESS Score
- Nov 4, 2026 Distribution Patch (4 in total, the first dated here)
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2022-31630
vulnetix vdb fixes CVE-2022-31630
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-31630/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart