On this page (7 sections)
Ubuntu has published USN-9132-1, a security notice covering three vulnerabilities in apng2gif, a command-line tool that converts animated PNG (APNG) files into GIFs. The flaws are memory-handling bugs triggered by a specially crafted APNG file, and Ubuntu credits all three to the same researcher, Dileep Kumar Jallepalli.
The CVE records date back to March 2017, so this is an old set of bugs reaching an Ubuntu notice now. It matters most to anyone who runs apng2gif on a server, especially in a pipeline that converts images uploaded by users.
What happened
The Ubuntu notice describes three separate problems in how apng2gif reads APNG files. Ubuntu says that if a user or an automated system were tricked into converting a crafted file, an attacker could possibly cause a crash, and in the worst case run arbitrary code. The notice is dated 2026-11-17.
The underlying CVEs were first published by the National Vulnerability Database on March 17, 2017. The CVE records link to Debian bug reports, a Debian LTS announcement and an earlier Ubuntu notice (USN-4513-1), but the research does not give a patch timeline or fixed versions.
Technical details
All three issues come from trusting values stored inside the image file when deciding how much memory to use. In plain terms, the program does arithmetic or allocation based on numbers an attacker controls, and does not check that the result is sane.
| CVE | Weakness | What goes wrong | CVSS |
|---|---|---|---|
| CVE-2017-6960 | CWE-190 integer overflow | An overflow related to load_apng and the imagesize variable leads to a heap-based buffer over-read | 7.5 High |
| CVE-2017-6961 | CWE-20 improper input validation | read_chunk uses the chunk size from the file to decide how much memory to allocate, so huge allocations crash the program | 5.5 Medium |
| CVE-2017-6962 | CWE-190 integer overflow | read_chunk makes an unchecked addition of 12, causing a heap-based buffer overflow | 7.5 High |
The GitHub advisory for CVE-2017-6960 rates the over-read as network-reachable with no user interaction and a high availability impact. The advisory for CVE-2017-6961 uses a local attack vector and requires user interaction, which fits a tool someone runs on a file. These vector ratings describe the scoring model, not a confirmed attack path. In practice, exposure depends on how the tool is invoked.
Who is affected
Only systems with apng2gif installed are relevant. It is a niche utility, so many websites will not have it. The realistic exposure cases are:
- Servers or build scripts that call apng2gif to convert APNG files to GIF.
- Upload workflows (galleries, forums, CMS media handling, messaging) where an automated job converts user-supplied images.
- Developer and designer workstations that convert files received from others.
If nobody feeds apng2gif untrusted files, the risk is low. If an automated job does, a crafted upload could crash the job or, at worst, compromise the account running it. The GitHub advisories list affected and patched versions as unknown, so check your own release's Ubuntu notice for exact fixed package versions.
How to check your exposure
First find out whether the package is installed at all. This read-only command, run on Debian or Ubuntu, lists the package and its installed version if present. An error or no matching entry means it is not installed through the package manager.
dpkg -l apng2gifThis command shows the installed and candidate versions, so you can see whether an update is waiting.
apt-cache policy apng2gifAlso check for a copy built from source or bundled in a project, which the package manager will not report. This looks for the binary on the path and prints its location if found.
command -v apng2gifThen search your scripts and application code for calls to the tool to learn whether untrusted files ever reach it. Any matching lines show where it is used.
grep -rn "apng2gif" /var/www /opt /usr/local/bin 2>/dev/nullWhat to do now
- Read the Ubuntu notice USN-9132-1 and note the fixed package version for your Ubuntu release.
- Run the checks above to confirm whether apng2gif is installed anywhere, including build servers and containers.
- Update the package with your normal process (see the command below) and confirm the new version.
- If you cannot update yet, stop automated jobs from passing untrusted APNG files to apng2gif.
- If you do not need the tool, remove it so the risk disappears.
- Run any remaining conversion jobs under a low-privilege account with memory and time limits, so a crash or overflow has limited impact.
- Rebuild container images that include apng2gif so they pick up the patched package.
On Ubuntu, refresh package lists and upgrade only this package. The second command upgrades apng2gif without touching other installed packages.
sudo apt-get update
sudo apt-get install --only-upgrade apng2gifIf you do not use the tool at all, removing it is the simplest fix. Confirm nothing depends on it before you do. This command removes the package.
sudo apt-get remove apng2gifDetection and monitoring
Memory-corruption bugs in a converter usually show up as crashes before anything else. Watch for repeated failures of the job that runs apng2gif, segmentation fault messages in system logs, and unusual memory spikes around image processing. A burst of crashes right after uploads of unfamiliar APNG files is worth investigating.
This read-only search of the kernel log shows recent segmentation faults, which you can compare with apng2gif's run times.
sudo dmesg | grep -i segfaultFor public sites that accept uploads, review your general upload hygiene as well. Our guide to checking whether a website is hacked covers the signs to look for, and website hacked: what to do explains next steps if you find something. A website firewall can add a filtering layer in front of upload endpoints, though it does not replace patching the underlying tool.
Context and caveats
Several details are not established by the research: which Ubuntu releases the notice applies to, the exact fixed versions, and whether any of these flaws has been used in real attacks. The GitHub records are marked unreviewed. Treat the severity figures as published ratings and base your urgency on whether untrusted files can reach the tool in your environment.
Sources
This article is based on the public sources below. Details can change as vendors and researchers publish more; check the original advisories before acting on version numbers.
