CVE-2022-31630

published 14 Nov 2022 · updated 3 Aug 2024

OOB read due to insufficient input validation in imageloadfont()

6.5MediumCVSS 6.5EPSS 2%

No exploitation in the wild has been reported. EPSS puts the chance of exploitation in the next 30 days at 2%. Fixed in PHP 7.4.33, PHP 8.0.25 and PHP 8.1.12.

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.

Affected

Vendors, products and packages with version ranges

VendorProductVersionsFixed
PHP GroupPHP>=7.4.x <7.4.33, >=8.0.x <8.0.25, >=8.1.x <8.1.127.4.33, 8.0.25, 8.1.12

Timeline

Every event on this vulnerability

Related

Other vulnerabilities in PHP, strongest first

Embed

A live severity badge for an advisory, README or ticket

CVE-2022-31630 severity on Zeptric[![CVE-2022-31630](https://zeptric.io/badge/cve/CVE-2022-31630.svg)](https://zeptric.io/cve/CVE-2022-31630)