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.

The three flaws in apng2gif 1.7
CVEWeaknessWhat goes wrongCVSS
CVE-2017-6960CWE-190 integer overflowAn overflow related to load_apng and the imagesize variable leads to a heap-based buffer over-read7.5 High
CVE-2017-6961CWE-20 improper input validationread_chunk uses the chunk size from the file to decide how much memory to allocate, so huge allocations crash the program5.5 Medium
CVE-2017-6962CWE-190 integer overflowread_chunk makes an unchecked addition of 12, causing a heap-based buffer overflow7.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.

Ubuntu's wording differs by flaw. For CVE-2017-6960 it mentions possible information disclosure or denial of service. For CVE-2017-6961 only a crash. For CVE-2017-6962 a crash or possibly arbitrary code execution. Code execution is described as possible, not demonstrated.

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.

Check whether apng2gif is installed (Debian/Ubuntu)Shell
dpkg -l apng2gif

This command shows the installed and candidate versions, so you can see whether an update is waiting.

Show installed and available apng2gif versions (Debian/Ubuntu)Shell
apt-cache policy apng2gif

Also 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.

Look for an apng2gif binary on the PATH (Linux)Shell
command -v apng2gif

Then 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.

Search a code directory for apng2gif usage (adjust the path)Shell
grep -rn "apng2gif" /var/www /opt /usr/local/bin 2>/dev/null

What to do now

  1. Read the Ubuntu notice USN-9132-1 and note the fixed package version for your Ubuntu release.
  2. Run the checks above to confirm whether apng2gif is installed anywhere, including build servers and containers.
  3. Update the package with your normal process (see the command below) and confirm the new version.
  4. If you cannot update yet, stop automated jobs from passing untrusted APNG files to apng2gif.
  5. If you do not need the tool, remove it so the risk disappears.
  6. Run any remaining conversion jobs under a low-privilege account with memory and time limits, so a crash or overflow has limited impact.
  7. 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.

Update apng2gif only (Ubuntu)Shell
sudo apt-get update
sudo apt-get install --only-upgrade apng2gif
Caution. If a service calls apng2gif during a request, test the updated version in staging first. Restart any long-running worker that may have loaded the old binary or been running a conversion.

If 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.

Remove apng2gif if unused (Ubuntu)Shell
sudo apt-get remove apng2gif

Detection 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.

Look for recent segfaults in the kernel log (Linux)Shell
sudo dmesg | grep -i segfault

For 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.

  1. CVE-2017-6960 - GitHub Advisory Databasegithub.com
  2. CVE-2017-6961 - GitHub Advisory Databasegithub.com
  3. CVE-2017-6962 - GitHub Advisory Databasegithub.com
  4. USN-9132-1: apng2gif vulnerabilitiesubuntu.com ·
  • Ubuntu
  • USN
  • apng2gif
  • integer overflow
  • image processing