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

Published Oct 27, 2022
·
Updated

Fixed bug : OOB read due to insufficient input validation in imageloadfont(). (CVE-2022-31630)

Other sources

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.

Launchpad

In PHP versions prior to 7.4.33, 8.0.25 and 8.2.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 Software

5 affected componentsFixes available
PHP PHP>=7.4.0<7.4.33
PHP PHP>=8.0.0<8.0.25
PHP PHP>=8.1.0<8.1.12
PHP PHP<8.0.25
8.0.25
debian/php7.4
7.4.33-1+deb11u57.4.33-1+deb11u8

Remediation

Event History

Oct 27, 2022
CVE Published
via PHP·12:00 AM
Nov 14, 2022
CVE Published
via MITRE·06:53 AM
Data Sourced
via MITRE·06:53 AM
DescriptionSeverityWeakness
May 11, 2024
Data Sourced
via Launchpad·06:20 PM
Description
Sep 20, 2024
Data Sourced
via Ubuntu·06:41 PM
RemedyDescriptionSeverityAffected Software

Frequently Asked Questions

1

What is the vulnerability ID?

The vulnerability ID is CVE-2022-31630.

2

What is the title of the vulnerability?

The title of the vulnerability is Fixed bug: OOB read due to insufficient input validation in imageloadfont(). (CVE-2022-31630).

3

What is the severity of CVE-2022-31630?

The severity of CVE-2022-31630 is not specified.

4

How does CVE-2022-31630 affect PHP?

CVE-2022-31630 affects PHP versions prior to 7.4.33, 8.0.25, and 8.2.12.

5

How can I fix CVE-2022-31630?

To fix CVE-2022-31630, upgrade to PHP version 7.4.33 or apply the recommended patches.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203