CVE-2022-31630
OOB read due to insufficient input validation in imageloadfont()
MEDIUM 6.5
At a glance
- Source
- NVD
- EPSS
- EPSS 1.32 % · percentile 71 ()
- 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.
Weaknesses (CWE)
- CWE-131 — Incorrect Calculation of Buffer Size
- CWE-190 — Integer Overflow or Wraparound
- CWE-125 — Out-of-bounds Read
References
Scores
| Version | Score | Vector | Scored by |
|---|---|---|---|
| CVSS 3.1 | MEDIUM 6.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L | php |
| CVSS 3.1 | MEDIUM 6.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L | NVD · security@php.net (Secondary) |
| CVSS 3.1 | HIGH 7.1 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:H | NVD · nvd@nist.gov (Primary) |
European references
- ENISA EUVD · EUVD-2022-53082
- GCVE · GCVE-0-2022-31630
CERT-FR advisories
- CERTFR-2022-AVI-992 — Multiples vulnérabilités dans PHP · cert.ssi.gouv.fr
- CERTFR-2022-AVI-971 — Multiples vulnérabilités dans PHP · cert.ssi.gouv.fr
Affected configurations (NVD CPE)
cpe:2.3:a:php:php:*:*:*:*:*:*:*:*≥ 7.4.0 < 7.4.33cpe:2.3:a:php:php:*:*:*:*:*:*:*:*≥ 8.0.0 < 8.0.25cpe:2.3:a:php:php:*:*:*:*:*:*:*:*≥ 8.1.0 < 8.1.12
Affected products
| Product | Versions |
|---|---|
| PHP Group · PHP | affected 7.4.x < 7.4.33 ; affected 8.0.x < 8.0.25 ; affected 8.1.x < 8.1.12 |
Sources
| Source | Licence |
|---|---|
| CVE List (CVEProject cvelistV5) | CVE Program Terms of Use |
| EPSS (FIRST.org) | FIRST — attribution requested |
| ENISA EUVD | ENISA — reproduction authorised, source acknowledged |
| CERT-FR (ANSSI) | Licence Ouverte / Etalab 2.0 |
| NVD (NIST) via fkie-cad/nvd-json-data-feeds | Public domain — this product uses data from the NVD API but is not endorsed or certified by the NVD |