GIF corruption via overflowing frame pixel count
Published Mar 27, 2026 · Updated Mar 27, 2026
Integer overflow in CGIF 0.5.0 through 0.5.2 allows context-dependent attackers to corrupt generated GIF animations via oversized frame dimensions. In cgif_addframe, signed-int promotion of width multiplied by height can produce a negative loop bound, skip pixel comparison, and cause distinct frames to be treated as identical and discarded. Reachability requires a consuming application to accept attacker-influenced dimensions exceeding the signed-int limit, complete multi-gigabyte allocations, and enter the flagged frame-comparison path.
Summary
What happened
Integer overflow in CGIF 0.5.0 through 0.5.2 allows context-dependent attackers to corrupt generated GIF animations via oversized frame dimensions. In cgif_addframe, signed-int promotion of width multiplied by height can produce a negative loop bound, skip pixel comparison, and cause distinct frames to be treated as identical and discarded. Reachability requires a consuming application to accept attacker-influenced dimensions exceeding the signed-int limit, complete multi-gigabyte allocations, and enter the flagged frame-comparison path.
The record
- CVE
- CVE-2026-4985
- Published
- Mar 27, 2026
- Updated
- Mar 27, 2026
- Vendor
- dloebl
- Product
- CGIF
- Classifications
- CWE-189, CWE-190
- Attack vector
- network
- Privileges
- unauthenticated
Timeline
How it unfolded
- Mar 27, 2026CVE publishedPublication date reported by the CVE source.
- Mar 27, 2026Record 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=0.5.0
- Affected versionversion=0.5.1
- Affected versionversion=0.5.2
What conditions does exploitation require?
What is affected?
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
- CGIF oversized-frame triggerproof of concept · unverified
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