CVE-2022-31630: PHP

High severity, CVSS 7.1. EPSS: 2.3% chance of exploitation in the next 30 days.

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 products

  • PHP PHP: from 7.4.0, before 7.4.33 (fixed in 7.4.33); from 8.0.0, before 8.0.25 (fixed in 8.0.25); from 8.1.0, before 8.1.12 (fixed in 8.1.12)

Published 2022-11-14. Last modified 2026-06-17.