Buffer Overflow Vulnerability in OpenJPEG Package: CVE-2020-27824

openjpeg Updated 02 Oct 2025

Summary

13/05/2021
N/A
Yes i
Medium
5.5

ALPINE-CVE-2020-27824: A flaw was found in OpenJPEG’s encoder in the opj_dwt_calc_explicit_stepsizes() function. Affects openjpeg versions < 2.3.1-r5. Fixed in 2.3.1-r5. 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 MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

OpenJPEG is an open-source JPEG 2000 codec that provides a comprehensive implementation for encoding and decoding JPEG 2000 images. It is widely used in various applications due to its ability to handle high-quality image compression and decompression. However, it has been found to be vulnerable to a buffer overflow issue in its encoder, specifically in the opj_dwt_calc_explicit_stepsizes() function, which can be exploited by attackers.

Vulnerability Detail

A flaw was discovered in the OpenJPEG encoder that allows an attacker to supply crafted input to the decomposition levels, leading to a buffer overflow. This vulnerability can potentially compromise system availability, as it may allow an attacker to execute arbitrary code or crash the application. The vulnerability is identified as CVE-2020-27824 and has a CVSS score of 5.5, indicating a moderate severity level.

How To Fix

Minimum fixed version

2.3.1-r5

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 patching is not feasible, consider restricting access to the application or disabling features that utilize OpenJPEG until the vulnerability can be addressed.

Conclusion

The OpenJPEG package has a critical vulnerability (CVE-2020-27824) that can lead to buffer overflow issues, potentially compromising system availability. It is essential to update to the patched versions to mitigate this risk. Regular monitoring and vulnerability assessments, such as those provided by Vulert, can help maintain software security.

See every vulnerability recorded for openjpeg →

Share this vulnerability

FAQ

CVE-2020-27824 is a vulnerability in the OpenJPEG package that allows for a buffer overflow due to improper handling of crafted input in the encoder.

Exploitation of this vulnerability can lead to system crashes or arbitrary code execution, impacting the availability and security of your application.

All versions of OpenJPEG prior to the patched versions (2.3.1-r5 for Alpine v3.10 and v3.11, and 2.3.1-r6 for Alpine v3.12 and later) are affected.

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

Vulert is a service that monitors and alerts in real-time for open-source vulnerabilities using just a manifest file like package-lock.json, ensuring your software remains secure.

Related vulnerabilities

Recent vulnerabilities recorded for openjpeg.

How To Fix

Minimum fixed version

2.3.1-r5

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