CVE-2021-45910
High · 7.8CVSS
7.8
EPSS
0.9%
Published
Dec 28, 2021
CISA due date
—
Cloudanix analysis
A bug in an old image conversion program lets attackers run their own code on a computer if someone opens a specially made picture file with that program.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Low
- Impact
- Full Compromise
- Component
- Application
- Class
- Memory Corruption
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Heap-based buffer overflow in the main function allowing an attacker to write attacker-controlled data outside the allocated buffer with partial control over the target address and write length.
Why it matters to the business
Local code execution or application crashes on systems that process untrusted GIF files with this conversion utility, potentially leading to compromise of developer or build machines that rely on the tool.
How an attack unfolds
An attacker crafts a specially malformed GIF file that triggers the heap overflow during conversion; the victim runs gif2apng on the file, allowing the attacker-controlled data to corrupt memory and achieve arbitrary code execution.
How to fix it
Remove or replace gif2apng with a maintained alternative; if a patched build becomes available, upgrade to the fixed version; avoid processing untrusted GIF inputs with this utility.
How to confirm the fix worked
Confirm the installed version is not 1.9, run the tool against known-good and known-bad test files to verify absence of overflow behavior, and monitor for any upstream patches.
Typical attack path
- Craft malicious GIF file exploiting the buffer overflow
- Deliver the file to a target system via email, download, or shared storage
- Trick the user or automated process into invoking gif2apng on the file
- Trigger heap corruption to execute attacker-supplied code
How to detect it
Search process execution logs and file-access records for invocations of gif2apng against files originating from untrusted sources; look for abnormal memory or crash dumps associated with the binary.
What your security team should do
- Inventory all systems using gif2apng and remove the binary where possible
- Block execution of gif2apng via application allow-listing
- Replace the utility with a supported image-conversion library or tool
- Educate developers on risks of unmaintained open-source utilities
The record
An issue was discovered in gif2apng 1.9. There is a heap-based buffer overflow within the main function. It allows an attacker to write data outside of the allocated buffer. The attacker has control over a part of the address that data is written to, control over the written data, and (to some extent) control over the amount of data that is written.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Debian:11 | gif2apng | 0 | 1.9+srconly-3+deb11u1 |
| Debian:9 | gif2apng | 0 | 1.9+srconly-2+deb9u2 |
| Ubuntu:18.04:LTS | gif2apng | 0 | 1.9+srconly-2ubuntu0.1 |
| Ubuntu:20.04:LTS | gif2apng | 0 | 1.9+srconly-3ubuntu0.1 |
| Ubuntu:Pro:16.04:LTS | gif2apng | 0 | 1.7-3ubuntu0.1~esm1 |
| Ubuntu:Pro:18.04:LTS | gif2apng | 0 | No fix |
Related vulnerabilities
- CVE-2021-45911 An issue was discovered in gif2apng 1.9. Also affects gif2apng
- CVE-2021-45909 An issue was discovered in gif2apng 1.9. Also affects gif2apng
- CVE-2026-111497 A buffer overflow vulnerability in the Brotli decoder (c/dec/decode.c) in Google Brotli… CWE-787
- CVE-2026-112397 Pillow is a Python imaging library. CWE-787
- CVE-2026-112059 libLAS through 1.8.1 contains a heap out-of-bounds write vulnerability in the point… CWE-787
- CVE-2026-89088 A flaw was found in parted. CWE-787
- CVE-2026-89085 A flaw was found in parted. CWE-787
- CVE-2026-85746 MariaDB server is a community developed fork of MySQL server. CWE-787