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 package | Versions | Reported by |
|---|---|---|
| PHP Group PHP | from 7.4.x before 7.4.33, from 8.0.x before 8.0.25, from 8.1.x before 8.1.12 | CVE List |
| php php | from 7.4.0 before 7.4.33, from 8.0.0 before 8.0.25, from 8.1.0 before 8.1.12 | NVD |
| 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.12 | Bitnami 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.12 | Bitnami 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.12 | Bitnami Vulnerability Database |
All scores
| php | 6.5medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L |
| NVD | 7.1high CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:H |
| Bitnami Vulnerability Database | high 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=81739 | advisory, exploit, issue-tracking, patch, vendor-advisory | |
| https://nvd.nist.gov/vuln/detail/CVE-2022-31630 | web | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2022-31630 changed 2024-08-03 | CVE Terms of Use |
| NVD | CVE-2022-31630 changed 2026-06-17 | Public domain |
| Bitnami Vulnerability Database | BIT-LIBPHP-2022-31630 changed 2026-09-08 | Apache-2.0 |
| Bitnami Vulnerability Database | BIT-PHP-2022-31630 changed 2026-09-08 | Apache-2.0 |
| Bitnami Vulnerability Database | BIT-PHP-MIN-2022-31630 changed 2026-09-08 | Apache-2.0 |