CVE-2022-31630
JSON

6.5medium

OOB read due to insufficient input validation in imageloadfont()

Severity
6.5medium CVSS:3.1 by php
Exploit likelihood
1.52% (higher than 75% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
php
Also known as
BIT-LIBPHP-2022-31630BIT-PHP-2022-31630BIT-PHP-MIN-2022-31630

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.

Affected

Product or packageVersionsReported by
PHP Group PHPfrom 7.4.x before 7.4.33, from 8.0.x before 8.0.25, from 8.1.x before 8.1.12CVE List
php phpfrom 7.4.0 before 7.4.33, from 8.0.0 before 8.0.25, from 8.1.0 before 8.1.12NVD
libphp (Bitnami)from 7.4.0 before 7.4.33, from 8.0.0 before 8.0.25, from 8.1.0 before 8.1.12Bitnami Vulnerability Database
php (Bitnami)from 7.4.0 before 7.4.33, from 8.0.0 before 8.0.25, from 8.1.0 before 8.1.12Bitnami Vulnerability Database
php-min (Bitnami)from 7.4.0 before 7.4.33, from 8.0.0 before 8.0.25, from 8.1.0 before 8.1.12Bitnami Vulnerability Database

All scores

php6.5medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L
NVD7.1high CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:H
Bitnami Vulnerability Databasehigh rating

Classification

What each source says

CVE List

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.

NVD (es)

En versiones de PHP anteriores a 7.4.33, 8.0.25 y 8.2.12, cuando se usa la función imageloadfont() en la extensión gd, es posible proporcionar un archivo de fuente especialmente manipulado, como si la fuente cargada se usa con imagechar() función, se utilizará la lectura fuera del búfer asignado. Esto puede provocar fallos o divulgación de información confidencial.

References

https://bugs.php.net/bug.php?id=81739advisory, exploit, issue-tracking, patch, vendor-advisory
https://nvd.nist.gov/vuln/detail/CVE-2022-31630web

Sources

SourceRecordLicence
CVE ListCVE-2022-31630 changed 2024-08-03CVE Terms of Use
NVDCVE-2022-31630 changed 2026-06-17Public domain
Bitnami Vulnerability DatabaseBIT-LIBPHP-2022-31630 changed 2026-09-08Apache-2.0
Bitnami Vulnerability DatabaseBIT-PHP-2022-31630 changed 2026-09-08Apache-2.0
Bitnami Vulnerability DatabaseBIT-PHP-MIN-2022-31630 changed 2026-09-08Apache-2.0