CVE-2022-31630

OOB read due to insufficient input validation in imageloadfont()

HIGH
7.1
CVSS Score
Published: November 14, 2022 at 06:53 AM UTC
Updated: June 17, 2026 at 04:45 AM UTC
1 product affected across 1 vendorPHP

Using PHP by PHP Group?

Get instant alerts when new vulnerabilities affect PHP - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
HIGH7.1
Exploit prediction
EPSS 1%

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

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

PHP· PHPdrupal
95%
7.4.0 ≤ v < 7.4.337.4.x ≤ v < 7.4.338.0.0 ≤ v < 8.0.258.0.x ≤ v < 8.0.258.1.0 ≤ v < 8.1.128.1.x ≤ v < 8.1.127.4.x8.0.x8.1.x
Affected range stops below 7.4.33, so it looks safe — our inference, not a vendor statement
Affected range stops below 8.0.25, so it looks safe — our inference, not a vendor statement
Affected range stops below 8.1.12, so it looks safe — our inference, not a vendor statement

Remediation

No guide yet

No remediation guidance has been written for this CVE yet. What the record does show:

Patch and advisory references

References (1)

ExploitIssue TrackingPatchVendor Advisory
https://bugs.php.net/bug.php?id=81739

CVSS

Attack Vector
LOCAL
Complexity
LOW
Privileges
NONE
User Interaction
REQUIRED
Scope
UNCHANGED
Confidentiality
HIGH
Integrity
NONE
Availability
HIGH
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-131CWE-190CWE-125

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card