CVE-2018-6616
Description
OpenJPEG 2.3.0 has an excessive iteration in opj_t1_encode_cblks that can be triggered by a crafted BMP file, causing a denial of service.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
OpenJPEG 2.3.0 has an excessive iteration in opj_t1_encode_cblks that can be triggered by a crafted BMP file, causing a denial of service.
Vulnerability
In OpenJPEG 2.3.0, the opj_t1_encode_cblks function in openjp2/t1.c contains an excessive iteration issue. The function contains nested loops over components, resolutions, bands, precincts, and code-blocks. An attacker can craft a BMP file that manipulates loop termination variables (such as prc->cw * prc->ch and res->pw * res->ph) to cause the function to iterate for an extremely long time, effectively hanging the compression process. The issue is present in version 2.3.0 and the master branch [1].
Exploitation
An attacker must deliver a specially crafted BMP file to a user or service that uses opj_compress (or any application leveraging the library's compression functionality) with the vulnerable version. The exploit requires no authentication or special privileges beyond the ability to provide the BMP file as input. The attacker triggers the excessive iteration by running a command such as ./opj_compress -n 1 -i $POC -o /tmp/null.j2k, where the POC file is a 144-byte BMP that causes OpenJPEG to spend more than 15 minutes in the nested loops, resulting in denial of service [1].
Impact
Successful exploitation results in a denial of service, as the compression process becomes unresponsive for an extended period or indefinitely. This can lead to resource exhaustion and unavailability of the affected service or system. The impact is limited to availability; there is no evidence of information disclosure or code execution [1].
Mitigation
The upstream OpenJPEG project has not released a patched version for this specific issue as of the reference date (February 2018). The issue is distinct from #996, which was fixed in commit 5597522, but CVE-2018-6616 remains unaddressed in the reference. Users should monitor the OpenJPEG repository for future updates. Until a fix is available, avoid processing untrusted BMP files with OpenJPEG's compression functionality. This CVE is not listed in CISA's Known Exploited Vulnerabilities catalog.
AI Insight generated on May 26, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected products
25- osv-coords24 versionspkg:rpm/opensuse/ghostscript&distro=openSUSE%20Tumbleweedpkg:rpm/opensuse/openjpeg2&distro=openSUSE%20Leap%2015.3pkg:rpm/suse/openjpeg2&distro=SUSE%20Enterprise%20Storage%206pkg:rpm/suse/openjpeg2&distro=SUSE%20Enterprise%20Storage%207pkg:rpm/suse/openjpeg2&distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP1-ESPOSpkg:rpm/suse/openjpeg2&distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP1-LTSSpkg:rpm/suse/openjpeg2&distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP2-ESPOSpkg:rpm/suse/openjpeg2&distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP2-LTSSpkg:rpm/suse/openjpeg2&distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015-ESPOSpkg:rpm/suse/openjpeg2&distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015-LTSSpkg:rpm/suse/openjpeg2&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Basesystem%2015%20SP3pkg:rpm/suse/openjpeg2&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Package%20Hub%2015%20SP3pkg:rpm/suse/openjpeg2&distro=SUSE%20Linux%20Enterprise%20Real%20Time%2015%20SP2pkg:rpm/suse/openjpeg2&distro=SUSE%20Linux%20Enterprise%20Server%2015%20SP1-BCLpkg:rpm/suse/openjpeg2&distro=SUSE%20Linux%20Enterprise%20Server%2015%20SP1-LTSSpkg:rpm/suse/openjpeg2&distro=SUSE%20Linux%20Enterprise%20Server%2015%20SP2-BCLpkg:rpm/suse/openjpeg2&distro=SUSE%20Linux%20Enterprise%20Server%2015%20SP2-LTSSpkg:rpm/suse/openjpeg2&distro=SUSE%20Linux%20Enterprise%20Server%2015-LTSSpkg:rpm/suse/openjpeg2&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2015pkg:rpm/suse/openjpeg2&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2015%20SP1pkg:rpm/suse/openjpeg2&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2015%20SP2pkg:rpm/suse/openjpeg2&distro=SUSE%20Manager%20Proxy%204.1pkg:rpm/suse/openjpeg2&distro=SUSE%20Manager%20Retail%20Branch%20Server%204.1pkg:rpm/suse/openjpeg2&distro=SUSE%20Manager%20Server%204.1
< 9.54.0-2.2+ 23 more
- (no CPE)range: < 9.54.0-2.2
- (no CPE)range: < 2.3.0-150000.3.5.1
- (no CPE)range: < 2.3.0-150000.3.5.1
- (no CPE)range: < 2.3.0-150000.3.5.1
- (no CPE)range: < 2.3.0-150000.3.5.1
- (no CPE)range: < 2.3.0-150000.3.5.1
- (no CPE)range: < 2.3.0-150000.3.5.1
- (no CPE)range: < 2.3.0-150000.3.5.1
- (no CPE)range: < 2.3.0-150000.3.5.1
- (no CPE)range: < 2.3.0-150000.3.5.1
- (no CPE)range: < 2.3.0-150000.3.5.1
- (no CPE)range: < 2.3.0-150000.3.5.1
- (no CPE)range: < 2.3.0-150000.3.5.1
- (no CPE)range: < 2.3.0-150000.3.5.1
- (no CPE)range: < 2.3.0-150000.3.5.1
- (no CPE)range: < 2.3.0-150000.3.5.1
- (no CPE)range: < 2.3.0-150000.3.5.1
- (no CPE)range: < 2.3.0-150000.3.5.1
- (no CPE)range: < 2.3.0-150000.3.5.1
- (no CPE)range: < 2.3.0-150000.3.5.1
- (no CPE)range: < 2.3.0-150000.3.5.1
- (no CPE)range: < 2.3.0-150000.3.5.1
- (no CPE)range: < 2.3.0-150000.3.5.1
- (no CPE)range: < 2.3.0-150000.3.5.1
Patches
0No patches discovered yet.
Vulnerability mechanics
Root cause
"Excessive iteration in the opj_t1_encode_cblks function can be triggered by crafted input."
Attack vector
Remote attackers can send a crafted BMP file to the `opj_compress` utility. This crafted file causes the `opj_t1_encode_cblks` function to enter an excessive iteration state. The program then becomes unresponsive for an extended period, leading to a denial of service.
Affected code
The vulnerability resides in the `opj_t1_encode_cblks` function located in `openjp2/t1.c`. The issue involves a five-level nested loop structure where the terminating variables can be manipulated by the input file, leading to excessive iterations.
What the fix does
The advisory does not specify a patch or provide remediation guidance. Therefore, the exact fix is not detailed. However, the vulnerability is described as an excessive iteration within the `opj_t1_encode_cblks` function, suggesting that loop termination conditions or input processing related to block encoding need to be corrected.
Preconditions
- inputA crafted BMP file is required as input.
Reproduction
To reproduce the issue, run: ./opj_compress -n 1 -i $POC -o /tmp/null.j2k POC: https://github.com/ProbeFuzzer/poc/blob/master/openjpeg/openjpeg_2-3_opj_compress_excessive-iteration_opj_t1_encode_cblks.bmp
Generated on Jun 2, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
5- usn.ubuntu.com/4109-1/mitrevendor-advisoryx_refsource_UBUNTU
- www.debian.org/security/2019/dsa-4405mitrevendor-advisoryx_refsource_DEBIAN
- github.com/uclouvain/openjpeg/issues/1059mitrex_refsource_MISC
- lists.debian.org/debian-lts-announce/2018/12/msg00013.htmlmitremailing-listx_refsource_MLIST
- www.oracle.com/security-alerts/cpujul2020.htmlmitrex_refsource_MISC
News mentions
0No linked articles in our index yet.