PT-2022-5981 · Unknown+10 · Gd Extension+10

Cmb

+1

·

Published

2022-10-27

·

Updated

2025-08-11

·

CVE-2022-31630

CVSS v3.1

7.1

High

VectorAV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:H
Name of the Vulnerable Software and Affected Versions PHP versions prior to 7.4.33, 8.0.25 and 8.1.12
Description The issue is related to the imageloadfont() function in the gd extension, which can be exploited by providing a specially crafted font file. When the loaded font is used with the imagechar() function, it can lead to reading outside the allocated buffer, resulting in crashes or disclosure of confidential information.
Recommendations For PHP versions prior to 7.4.33, update to version 7.4.33 or later. For PHP versions prior to 8.0.25, update to version 8.0.25 or later. For PHP versions prior to 8.1.12, update to version 8.1.12 or later. As a temporary workaround, consider disabling the imageloadfont() function in the gd extension until a patch is available. Restrict access to the gd extension to minimize the risk of exploitation. Avoid using the imagechar() function with loaded fonts from untrusted sources until the issue is resolved.

Exploit

Fix

Out of bounds Read

Integer Overflow

Weakness Enumeration

Related Identifiers

ALSA-2023:0848
ALSA-2023:0965
ALSA-2023:2417
ALSA-2023:2903
ALT-PU-2022-2960
ALT-PU-2022-2964
ALT-PU-2022-2986
ALT-PU-2022-2988
ALT-PU-2022-2994
ALT-PU-2022-3024
ALT-PU-2022-3093
ALT-PU-2022-3107
BDU:2022-07409
BIT-LIBPHP-2022-31630
BIT-PHP-2022-31630
BIT-PHP-MIN-2022-31630
CESA-2023_0848
CESA-2023_2903
CVE-2022-31630
DSA-5277-1
OESA-2023-1620
OPENSUSE-SU-2022_3997-1
OPENSUSE-SU-2022_4005-1
OPENSUSE-SU-2022_4069-1
OPENSUSE-SU-2024:12467-1
RHSA-2023:0848
RHSA-2023:0965
RHSA-2023:2417
RHSA-2023:2903
RHSA-2023_0848
RHSA-2023_0965
RHSA-2023_2417
RHSA-2023_2903
RLSA-2023:0848
RLSA-2023:0965
SUSE-SU-2022:3997-1
SUSE-SU-2022:4005-1
SUSE-SU-2022:4068-1
SUSE-SU-2022:4069-1
SUSE-SU-2022_4005-1
USN-5717-1

Affected Products

Alt Linux
Almalinux
Centos
Linuxmint
Php
Red Hat
Red Os
Rocky Linux
Suse
Ubuntu
Gd Extension