CVE-2022-31630 | OOB read due to insufficient input validation in imageloadfont()

Exp

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. 

Published: 2022-11-14 Last update: 2024-11-21 Assigner: [email protected] Source: [email protected]

Conclusion & alert: CVE-2022-31630 is rated Exploit Available (50/100): CVSS Medium severity, with low exploitation likelihood (EPSS 0.05%). Core evidence: 1 public exploit reference(s) are indexed (Exploit-DB). Mandatory action: Public exploits are available—assess exposure, apply mitigations, and prioritize patching.

Risk is dynamic; we continuously reassess and refresh what is shown on this page as upstream context changes.

Public exploit references (Exploit-DB) for CVE-2022-31630

EDB-ID Source Kind Published Link
nvd_ref exploit_tag Exploit-DB ↗

Exploit prediction scoring system (EPSS) score for CVE-2022-31630

EPSS lead: Daily EPSS estimates relative likelihood of exploitation; percentile ranks this CVE among scored vulnerabilities (higher = more severe relative rank).

# Date Old EPSS score New EPSS score Delta (New - Old)
1 2026-05-25 0.06% 0.05% -0.01%
2 2025-12-28 0.04% 0.06% +0.01%
3 2025-12-27 0.04%

Full EPSS history (13 records total)

Common vulnerability scoring system (CVSS) metrics for CVE-2022-31630

CVSS metrics for this CVE.

Base score Version Severity Vector Exploitability Impact Score source
6.5 3.1 MEDIUM
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:L)
Some sensitive info could get out, but not a total data dump.
Integrity (I:N)
Data isn’t meaningfully altered or forged.
Availability (A:L)
Might cause slowdowns, glitches, or partial disruption—not a full brick.
3.9 2.5 [email protected]
7.1 3.1 HIGH
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:H Click to expand
Attack vector (AV:L)
They already need access on the box, or another person has to do something wrong; it’s not a remote drive-by.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:R)
A real person has to do something—click, install, enable—otherwise it doesn’t land.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:H)
Serious risk that confidential data gets exposed in a big way.
Integrity (I:N)
Data isn’t meaningfully altered or forged.
Availability (A:H)
Could take the service down hard or make it unusable for people who depend on it.
1.8 5.2 [email protected]

Weakness enumeration for CVE-2022-31630

OS Trackers for CVE-2022-31630

vendor priority summary link
alpine CVE-2022-31630: 3 source package rows (php8, php81, php82); 11 state rows across 7 repos (3.17-community, 3.18-community, 3.19-community, 3.20-community, 3.21-community, 3.22-community, edge-community); fixed 11, open 0. https://security.alpinelinux.org/vuln/CVE-2022-31630
debian not yet assigned CVE-2022-31630 not yet assigned priority: Debian including 1 source packages (php7.4), 1 status rows across 1 suites (bullseye): resolved 1. https://security-tracker.debian.org/tracker/CVE-2022-31630
gentoo normal CVE-2022-31630: 1 GLSA(s) (202211-03), 1 atom(s) (dev-lang/php); latest impact normal. https://bugs.gentoo.org/buglist.cgi?quicksearch=CVE-2022-31630
redhat medium https://access.redhat.com/security/cve/CVE-2022-31630
suse medium CVE-2022-31630 severity moderate: SUSE including 457 source package names (8-4.1:apache2-mod_php8-8.0.25-150400.4.17.1, 8-4.1:php8-8.0.25-150400.4.17.1, …), 1808 product×package rows across 48 product lines (Container bci/php, Container bci/php-apache, … (48 product lines)): Fixed 1375, Known Not Affected 433. https://www.suse.com/security/cve/CVE-2022-31630/
ubuntu medium CVE-2022-31630 medium priority: Ubuntu including 5 source packages (php5, php7.0, php7.2, php7.4, php8.1), 36 status rows across 8 suites (bionic, focal, jammy, kinetic, lunar, trusty, upstream, xenial): DNE 24, released 5, needs-triage 4, not-affected 3. https://ubuntu.com/security/CVE-2022-31630

Affected software / configurations for CVE-2022-31630

Vendor Product Version Raw CPE
php php >= 7.4.0, < 7.4.33 cpe:2.3:a:php:php:*:*:*:*:*:*:*:*
php php >= 8.0.0, < 8.0.25 cpe:2.3:a:php:php:*:*:*:*:*:*:*:*
php php >= 8.1.0, < 8.1.12 cpe:2.3:a:php:php:*:*:*:*:*:*:*:*

References for CVE-2022-31630

URL Tags
https://bugs.php.net/bug.php?id=81739 Exploit Issue Tracking Patch Vendor Advisory
cvelogic Threat Intelligence