Heap Buffer Overflow in OpenJPEG: CVE-2016-9580 Vulnerability

openjpeg Updated 02 Oct 2025

Summary

01/08/2018
N/A
Yes i
High
8.8

ALPINE-CVE-2016-9580: An integer overflow vulnerability was found in tiftoimage function in openjpeg 2.1.2, resulting in heap buffer overflow. Affects openjpeg versions < 2.1.2-r1. Fixed in 2.1.2-r1. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

OpenJPEG is an open-source library for handling JPEG 2000 image format. It is widely used for image processing and supports various functionalities such as encoding and decoding of JPEG 2000 images. The library is crucial for applications that require high-quality image compression and decompression. However, it has been found to be vulnerable to an integer overflow issue that can lead to a heap buffer overflow, potentially compromising the security of applications that utilize this library.

Vulnerability Detail

The vulnerability, identified as CVE-2016-9580, originates from an integer overflow in the tiftoimage function of OpenJPEG version 2.1.2. This flaw allows an attacker to exploit the heap buffer overflow, which can lead to arbitrary code execution, data corruption, or application crashes. The severity of this vulnerability is high, with a CVSS score of 8.8, indicating a significant risk to systems using the affected version of OpenJPEG.

How To Fix

Minimum fixed version

2.1.2-r1

This is the first release that contains the fix.

sudo apk add --upgrade openjpeg

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If immediate updating is not feasible, consider implementing input validation to mitigate the risk of exploitation. Ensure that any inputs to the tiftoimage function are properly sanitized and checked for expected ranges before processing.

Conclusion

The CVE-2016-9580 vulnerability in OpenJPEG poses a serious risk due to its potential for heap buffer overflow. It is crucial for users of the library to update to the patched version 2.1.2-r1 to mitigate this risk. Regular monitoring for vulnerabilities using tools like Vulert can help maintain the security of your applications.

See every vulnerability recorded for openjpeg →

Share this vulnerability

FAQ

CVE-2016-9580 is a vulnerability in OpenJPEG that allows for heap buffer overflow due to an integer overflow in the tiftoimage function.

You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.

Exploitation of this vulnerability can lead to arbitrary code execution, data corruption, or application crashes, posing a significant security risk.

Yes, the patched version of OpenJPEG is 2.1.2-r1. Updating to this version will resolve the vulnerability.

The CVSS score of CVE-2016-9580 is 8.8, indicating a high severity level.

Related vulnerabilities

Recent vulnerabilities recorded for openjpeg.

How To Fix

Minimum fixed version

2.1.2-r1

This is the first release that contains the fix.

sudo apk add --upgrade openjpeg

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback