CVE-2022-31630 OOB read due to insufficient input validation in imageloadfont()
Attackers can cause crashes or disclose confidential information via out-of-bounds read in PHP's imageloadfont function using crafted font files.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2022-31630?
CVE-2022-31630 is a medium-severity memory corruption vulnerability in Php Php, published on 14 Nov 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official 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.
Which versions are affected by CVE-2022-31630?
3 open source packages ship an affected version, including libphp, php and php-min. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
libphp Bitnami | From 7.4.0 | 7.4.33, 8.0.25, 8.1.12 |
php Bitnami | From 7.4.0 | 7.4.33, 8.0.25, 8.1.12 |
php-min Bitnami | From 7.4.0 | 7.4.33, 8.0.25, 8.1.12 |
Linux distribution packages (1)
php8 openSUSE:Tumbleweed | All versions | 8.1.12-1.1 |
Products include Php Php.
How do I fix CVE-2022-31630?
Upgrade libphp to a fixed version for your release line: 7.4.33, 8.0.25 or 8.1.12.
Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.
Is CVE-2022-31630 being exploited?
There is no known exploitation of CVE-2022-31630 in the wild and no public exploit code.
Public exploit code: 2 proofs of concept on GitHub.
Other vulnerabilities in Php Php
Sources
Also known as BIT-libphp-2022-31630, BIT-php-2022-31630, BIT-php-min-2022-31630, DEBIAN-CVE-2022-31630, GHSA-jw98-jrc9-mrx5, UBUNTU-CVE-2022-31630 and 1 more.