Heap Buffer Overflow in OpenJPEG

openjpeg Updated 02 Oct 2025

Summary

05/09/2019
N/A
Yes i
High
8.8

CVE-2018-21010: OpenJPEG before 2.3.1 has a heap buffer overflow in color_apply_icc_profile in bin/common/color.c. Affects openjpeg across 2 version ranges.

< 2.3.0-r3 < 2e5ab1d9987831c981ff05862e8ccf1381ed58ea

Fixed in 2.3.0-r3. 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 Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

OpenJPEG is an open-source library for handling JPEG 2000 images. It provides functionality for encoding and decoding JPEG 2000 images, as well as various image manipulation operations. The library is widely used in applications that require efficient compression and decompression of images. However, a vulnerability has been discovered in OpenJPEG that could allow an attacker to execute arbitrary code or cause a denial of service.

Vulnerability Detail

The vulnerability, identified as CVE-2018-21010, is a heap buffer overflow in the color_apply_icc_profile function in the color.c file of OpenJPEG. This vulnerability occurs when processing an ICC profile embedded in an image. By exploiting this vulnerability, an attacker can overwrite adjacent memory locations, leading to arbitrary code execution or a crash of the application. The severity of this vulnerability is rated as critical with a CVSS score of 8.8.

How To Fix

Minimum fixed version

2.3.0-r3

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

As a temporary workaround, users can disable the processing of ICC profiles in OpenJPEG. This can be achieved by modifying the source code or configuration settings of the application to skip the color_apply_icc_profile function. However, this workaround may impact the functionality of applications that rely on ICC profiles for color management.

Conclusion

The heap buffer overflow vulnerability in OpenJPEG can be mitigated by updating to the fixed versions of the library. It is crucial to regularly update software dependencies to ensure the latest security patches are applied. For further assistance with vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for openjpeg →

Share this vulnerability

FAQ

OpenJPEG is an open-source library for handling JPEG 2000 images.

This vulnerability could allow an attacker to execute arbitrary code or cause a denial of service.

The severity of this vulnerability is rated as critical with a CVSS score of 8.8.

To fix this vulnerability, update to the fixed version of OpenJPEG (2.3.0-r3 for Alpine Linux v3.8 and 2.3.0-r4 for Alpine Linux v3.9).

Yes, a temporary workaround is to disable the processing of ICC profiles in OpenJPEG.

Related vulnerabilities

Recent vulnerabilities recorded for openjpeg.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

How To Fix

Minimum fixed version

2.3.0-r3

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