CVE-2022-31630

OOB read due to insufficient input validation in imageloadfont()

At a glance

Severity
MEDIUM 6.5
EPSS
EPSS 1.32 % · percentile 71 (2026-10-27)
State
PUBLISHED
Published
Updated
Assigner
php
NVD status
Modified

Description

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.

Scores

VersionScoreVectorScored by
CVSS 3.1MEDIUM 6.5CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:Lphp
CVSS 3.1MEDIUM 6.5CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:LNVD · security@php.net (Secondary)
CVSS 3.1HIGH 7.1CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:HNVD · nvd@nist.gov (Primary)

Weaknesses (CWE)

European references

CERT-FR advisories

Affected configurations (NVD CPE)

Affected products

ProductVersions
PHP Group · PHPaffected 7.4.x < 7.4.33 ; affected 8.0.x < 8.0.25 ; affected 8.1.x < 8.1.12

References

Sources

SourceLicence
CVE List (CVEProject cvelistV5)CVE Program Terms of Use
EPSS (FIRST.org)FIRST — attribution requested
ENISA EUVDENISA — reproduction authorised, source acknowledged
CERT-FR (ANSSI)Licence Ouverte / Etalab 2.0
NVD (NIST) via fkie-cad/nvd-json-data-feedsPublic domain — this product uses data from the NVD API but is not endorsed or certified by the NVD