Code execution via unchecked GIF palette length
Published Aug 22, 2022 · Updated Apr 15, 2025
Out-of-bounds read in gif2h5 in The HDF Group HDF5 1.10.4 allows attackers to execute code via a crafted GIF file. The ReadGifHeader() loop trusts the GIF Global Color Table size without comparing it with the file length, advances beyond input data, and can turn corrupted parser state into an arbitrary free. Exploitation requires a user or application to invoke gif2h5 on the malicious file; successful corruption can crash the process or execute code in that process.
Summary
What happened
Out-of-bounds read in gif2h5 in The HDF Group HDF5 1.10.4 allows attackers to execute code via a crafted GIF file. The ReadGifHeader() loop trusts the GIF Global Color Table size without comparing it with the file length, advances beyond input data, and can turn corrupted parser state into an arbitrary free. Exploitation requires a user or application to invoke gif2h5 on the malicious file; successful corruption can crash the process or execute code in that process.
The record
- CVE
- CVE-2022-25942
- Published
- Aug 22, 2022
- Updated
- Apr 15, 2025
- Vendor
- The HDF Group
- Product
- HDF5
- Classifications
- CWE-125, T1204.002
- Attack vector
- local
- Privileges
- unauthenticated
Timeline
How it unfolded
- Aug 22, 2022CVE publishedPublication date reported by the CVE source.
- Apr 15, 2025Record updatedLatest update available in the CVE record.
Exploitability
Present is not the same as exploitable
Compare your product and version with the public record. A matching version still requires validation against your environment.
Is a vulnerable build present?
Compare these published version ranges with your installed build and any vendor patches.
- Affected versionversion=1.10.4
What conditions does exploitation require?
What is affected?
Published CVSS scores
CVSS describes severity. EPSS estimates exploitation probability.
Attacks
What attackers are doing with it
Daily unique IPs observed by Shadowserver honeypots for known exploited vulnerabilities (KEVs). Missing observations do not establish an absence of attacks.
Public exploit references
- Cisco Talos crafted GIF proof of conceptproof of concept · demonstrated
Labels summarize the accepted research assessment. They do not indicate a test against your environment.
Technologies
Your stack
See the directory against your own environment.
Your stack
Check the software in your environment
Book a demo to see how Hinoki identifies affected software and validates exploitability in your environment.
Book a demo