CVE-2022-31630
A public proof of concept exists; no exploitation attested.
- Published2022-11-14
- Fixed in8.1.12 · 8.0.25 · 7.4.33
- WeaknessCWE-125 · CWE-131 · CWE-190
Am I affected?
Debian, Ubuntu or Red Hat sometimes backport a fix without changing the upstream version number: such a version reads « to verify », never « affected ».With a domain, we read the version its public headers and pages expose. A distribution build can carry the fix under an older number.
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.
Timeline
dates in UTC- 2022-11-1407:15CVE publishedNVD
Versions per branch
NVD · OSV| Branch | Affected | Fixed in | Source |
|---|---|---|---|
| 8.1 | ≥ 8.1.0, < 8.1.12 | 8.1.12 | NVD · OSV |
| 8.0 | ≥ 8.0.0, < 8.0.25 | 8.0.25 | NVD · OSV |
| 7.4 | ≥ 7.4.0, < 7.4.33 | 7.4.33 | NVD · OSV |
as publishedRanges as NVD and OSV publish them; a distribution’s build can be fixed under an older number.
Distribution builds and vendor advisories
Packages from OSV.dev and products from the vendors' CSAF advisories.
version not verifiedVersions not verified: read as OSV.dev and the vendors publish them, not checked against each vendor's release list.
Packages
- libzipRocky Linux:8all versions · fixed in 0:1.6.1-1.module+el8.10.0+1604+6558efc7
- libzipRocky Linux:8all versions · fixed in 0:1.6.1-1.module+el8.10.0+1912+72767185
- libzipRocky Linux:8all versions · fixed in 0:1.7.3-1.module+el8.6.0+790+fc63e43f
- libzipRed Hat:enterprise_linux:8::appstreamall versions · fixed in 0:1.7.3-1.module+el8.6.0+13671+84712317and 5 other packages
- libzipRed Hat:enterprise_linux:8::appstreamall versions · fixed in 0:1.6.1-1.module+el8.3.0+6678+b09f589eand 5 other packages
- libzipAlmaLinux:8all versions · fixed in 1.6.1-1.module_el8.6.0+2750+78feabcband 2 other packages
- libzipAlmaLinux:8all versions · fixed in 1.6.1-1.module_el8.6.0+3239+bedf0508and 2 other packages
- libzipAlmaLinux:8all versions · fixed in 1.7.3-1.module_el8.6.0+2739+efabdb8fand 2 other packages
116 more package ranges on OSV.dev
Vendor advisories
php: OOB read due to insufficient input validation in imageloadfont()
Red Hat Security Advisory: php:7.4 security update
Red Hat Security Advisory: php:8.1 security update
Red Hat Security Advisory: php security update
Red Hat Security Advisory: php:8.0 security update
Fix
- Update PHP to 8.1.12 · 8.0.25 · 7.4.33
- Vendor fix Red Hat Product Security RHSA-2023:2903 · 301 productsFor details on how to apply this update, which includes the changes described in this advisory, refer to: https://access.redhat.com/articles/11258 After installing the updated packages, the httpd daemon must be restarted for the update to take effect.
Advisories and patches
- bugs.php.netPatch · Vendor Advisory
Detection
read 2026-11-01 01:02 UTC- Nuclei template
- none so far ProjectDiscovery
- Exploit-DB
- no entry Exploit-DB
- Proof of concept
- PoC-in-GitHub2 repositories, unverifiedknown since 2026-11-01sepkascurty-cpu/CVE-2022-31630---Proof-of-Concept-Exploit-untuk-PHP-7.4.33sepkascurty-cpu/php-exploit_cve-2022-31630
- Metasploit modules
- none listed Metasploit Framework
Sources
- CNACVSS 3.16.5known since 2026-10-23
- NVDCVSS 3.17.1read 2026-10-23
- CNAweakness (CWE)CWE-131, CWE-190known since 2026-10-23
- NVDweakness (CWE)CWE-125read 2026-10-23
- FIRST EPSSEPSS score1.5 %2026-11-11
- PoC-in-GitHubproof of concept2known since 2026-11-01
- OSVaffected packages—
- GitHub Advisoriesadvisory—
Identifiers
- BIT-libphp-2022-31630same flawBitnami · Apache-2.0
- BIT-php-2022-31630same flawBitnami · Apache-2.0
- BIT-php-min-2022-31630same flawBitnami · Apache-2.0
- EUVD-2022-53082same flawENISA EUVD · LicenseRef-ENISA-legal-notice
- GHSA-jw98-jrc9-mrx5same flawGitHub Advisory Database · CC-BY-4.0
- ALSA-2023:0848advisory covering several CVEsAlmaLinux · MIT
- ALSA-2023:0965advisory covering several CVEsAlmaLinux · MIT
- ALSA-2023:2417advisory covering several CVEsAlmaLinux · MIT
- ALSA-2023:2903advisory covering several CVEsAlmaLinux · MIT
- DSA-5277-1advisory covering several CVEsDebian · LicenseRef-unstated
- OESA-2023-1620advisory covering several CVEsopenEuler · LicenseRef-unstated
- openSUSE-SU-2024:12467-1advisory covering several CVEsopenSUSE · LicenseRef-unstated
- RHSA-2023:0848advisory covering several CVEsRed Hat · CC-BY-4.0
- RHSA-2023:0965advisory covering several CVEsRed Hat · CC-BY-4.0
- RHSA-2023:2417advisory covering several CVEsRed Hat · CC-BY-4.0
- RHSA-2023:2903advisory covering several CVEsRed Hat · CC-BY-4.0
- RLSA-2023:0848advisory covering several CVEsRocky Linux · BSD-3-Clause
- RLSA-2023:0965advisory covering several CVEsRocky Linux · BSD-3-Clause
- RLSA-2023:2417advisory covering several CVEsRocky Linux · BSD-3-Clause
- RLSA-2023:2903advisory covering several CVEsRocky Linux · BSD-3-Clause
- SUSE-SU-2022:3997-1advisory covering several CVEsSUSE · LicenseRef-unstated
- SUSE-SU-2022:4005-1advisory covering several CVEsSUSE · LicenseRef-unstated
- SUSE-SU-2022:4068-1advisory covering several CVEsSUSE · LicenseRef-unstated
- SUSE-SU-2022:4069-1advisory covering several CVEsSUSE · LicenseRef-unstated
- USN-5717-1advisory covering several CVEsUbuntu
Technical details
- CVSS v3 Vector
- CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:H
- Published
- 2022-11-14
- Last Modified
- 2026-06-17
- NVD status
- Modified
- GitHub Advisory
- GHSA-jw98-jrc9-mrx5
Frequently asked questions
What is CVE-2022-31630?
Is CVE-2022-31630 actively exploited?
What is the CVSS score for CVE-2022-31630?
Running PHP? Hear about its next vulnerability
Surveillance reads the versions in your stack — a domain, a lockfile or a list — checks each CVE against the ranges its sources publish, and alerts you when one you run is exploited or enters CISA KEV. A version it cannot read stays « version not verified ».
No credit card required · No monthly cap on website lookups · 250 API requests/month
Go further
- Following what attackers exploit right now? The CISA KEV additions of the month, with their patch deadlines.
- Running this software? Vulnerability monitoring alerts you to new vulnerabilities in your products.
Related vulnerabilities
Same product first, then the same vendor advisory and the same publication week.
Sources for this record
- CVE Program · CVE Program Terms of Use
- ENISA EU Vulnerability Database · ENISA legal notice §1.2 (reproduction authorised, provided the source is acknowledged)
- FIRST EPSS · EPSS terms of use (free use, attribution requested)
- GitHub Advisory Database · CC-BY-4.0 · GHSA-jw98-jrc9-mrx5
- NVD · Public domain (17 U.S.C. § 105) for NVD-authored data; third-party content under its own terms
- OSV.dev · Per record, as its publisher states it: each row carries the label in sourceLicense when one is served
- PoC-in-GitHub · CC0-1.0
- Red Hat Product Security (CSAF and VEX) · CC-BY-4.0