CVE-2022-31630 is an out-of-bounds read in PHP's GD extension affecting PHP versions before 7.4.33, 8.0.25, and 8.1.12. Insufficient validation in imageloadfont() permits a specially crafted font file to create invalid font data. When the loaded font is subsequently used by imagechar(), PHP may read outside the allocated buffer.
Mallory correlates every CVE against your assets, your vendors, and active adversary campaigns. Know which vulnerabilities matter for you, not just which ones are loud.
What it means. What to do now. Patch path, mitigations, and the assume-compromise checklist.
What an attacker gets, and what they’ve been doing with it.
If you can’t patch tonight, do this now.
Patch, then assume compromise.
1 valid exploit after Mallory filtered fakes, detection scripts, and README-only repos (1 hidden).
This repository is a small standalone proof-of-concept for CVE-2022-31630, containing only a README and one PHP exploit script. The exploit is not part of a larger framework. Its purpose is to demonstrate an out-of-bounds read in PHP's GD extension, specifically in the imageloadfont() / imagechar() path when processing a malformed .gdf font file. Repository structure: README.md documents the vulnerability, affected versions, Docker-based test setup, expected behavior on vulnerable vs patched versions, and mitigation guidance. exploit_cve-2022-31630.php is the sole code file and main entry point. Exploit flow: createMalformedFont() builds a crafted GD font file at /tmp/malformed.gdf with a valid magic number but dangerous header values, notably width=65535, while keeping other fields mostly normal. triggerVulnerability() loads that font with imageloadfont(), creates a simple image canvas, and calls imagechar() to force the GD code to read character bitmap data using the malformed dimensions. The script then writes /tmp/output.png if execution continues. exploitWithMemoryLeak() places recognizable dummy secrets in memory before calling the trigger function, attempting to make any unintended memory disclosure easier to observe. Capabilities: The code can generate the malformed input, exercise the vulnerable code path, and demonstrate either denial of service (crash/segfault) or possible information disclosure. It does not provide remote delivery, persistence, shell access, or post-exploitation features. It is best classified as a local file-format memory-corruption PoC rather than a weaponized exploit. Notable implementation details: The script checks PHP version and whether the GD extension is loaded, pauses for user confirmation via STDIN, and is designed for lab execution. Although the README mentions broader affected branches (PHP 8.0.x and 8.1.x), the code and messaging are centered on PHP 7.4.32 versus 7.4.33 as the patch boundary demonstration.
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
Vendor-confirmed product mapping. Mallory continuously reconciles this list against your asset inventory.
3 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.
Query your assets running an affected version, and investigate the blast radius.
Every observed campaign linking this CVE to a named adversary.
Malware families riding this exploit, with evidence and IOCs.
YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Cross-references every affected SKU, including bundled OEM variants.
Community discussion across Reddit, Mastodon, and other social sources.