CVE-2020-27842
Description
OpenJPEG before version 2.4.0 has a null pointer dereference in the t2 encoder when processing crafted input, causing a denial of service.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
OpenJPEG before version 2.4.0 has a null pointer dereference in the t2 encoder when processing crafted input, causing a denial of service.
Vulnerability
A null pointer deference flaw exists in the opj_tgt_reset() function within lib/openjp2/tgt.c of OpenJPEG, affecting versions prior to 2.4.0 [1]. The vulnerability occurs in the t2 encoder component and can be triggered by providing a specially crafted JPEG 2000 file to the library [1][3]. When the crafted input is processed, a null pointer is dereferenced, leading to a crash.
Exploitation
An attacker must supply a maliciously crafted JPEG 2000 file to an application using the vulnerable OpenJPEG library. No special network position or authentication is required beyond the ability to deliver the input file. The exploitation path involves the crafted file causing an out-of-bounds read situation that culminates in a null pointer dereference within opj_tgt_reset() [1].
Impact
Successful exploitation results in a null pointer dereference, causing the application to crash. The impact is primarily on application availability (denial of service). No code execution or information disclosure is indicated by the available references [1][3].
Mitigation
The vulnerability is fixed in OpenJPEG version 2.4.0, released after the commit at https://github.com/uclouvain/openjpeg/pull/1296/commits/fbd30b064f8f9607d500437b6fedc41431fd6cdc [1]. Gentoo GLSA 202101-29 recommends upgrading to >=media-libs/openjpeg-2.4.0:2 [3]. Fedora and EPEL packages were tracked for updates [1]. No workarounds are available; upgrading to the fixed version is required.
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
50- openjpeg/openjpegdescription
- osv-coords48 versionspkg:rpm/almalinux/openjpeg2pkg:rpm/almalinux/openjpeg2-develpkg:rpm/almalinux/openjpeg2-devel-docspkg:rpm/almalinux/openjpeg2-toolspkg:rpm/opensuse/openjpeg2&distro=openSUSE%20Leap%2015.3pkg:rpm/opensuse/openjpeg2&distro=openSUSE%20Leap%2015.4pkg:rpm/opensuse/openjpeg&distro=openSUSE%20Leap%2015.3pkg:rpm/opensuse/openjpeg&distro=openSUSE%20Leap%2015.4pkg: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%20Basesystem%2015%20SP4pkg:rpm/suse/openjpeg2&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Package%20Hub%2015%20SP3pkg:rpm/suse/openjpeg2&distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP2-BCLpkg:rpm/suse/openjpeg2&distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP3-BCLpkg:rpm/suse/openjpeg2&distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP4-LTSSpkg:rpm/suse/openjpeg2&distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP5pkg: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%2012%20SP4pkg:rpm/suse/openjpeg2&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2012%20SP5pkg: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.1pkg:rpm/suse/openjpeg2&distro=SUSE%20OpenStack%20Cloud%209pkg:rpm/suse/openjpeg2&distro=SUSE%20OpenStack%20Cloud%20Crowbar%209pkg:rpm/suse/openjpeg&distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP2-ESPOSpkg:rpm/suse/openjpeg&distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP2-LTSSpkg:rpm/suse/openjpeg&distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015-ESPOSpkg:rpm/suse/openjpeg&distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015-LTSSpkg:rpm/suse/openjpeg&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Desktop%20Applications%2015%20SP3pkg:rpm/suse/openjpeg&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Desktop%20Applications%2015%20SP4pkg:rpm/suse/openjpeg&distro=SUSE%20Linux%20Enterprise%20Server%2015%20SP1-BCLpkg:rpm/suse/openjpeg&distro=SUSE%20Linux%20Enterprise%20Server%2015%20SP2-BCLpkg:rpm/suse/openjpeg&distro=SUSE%20Linux%20Enterprise%20Server%2015-LTSSpkg:rpm/suse/openjpeg&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2015
< 2.4.0-4.el8+ 47 more
- (no CPE)range: < 2.4.0-4.el8
- (no CPE)range: < 2.4.0-4.el8
- (no CPE)range: < 2.4.0-4.el8
- (no CPE)range: < 2.4.0-4.el8
- (no CPE)range: < 2.3.0-150000.3.8.1
- (no CPE)range: < 2.3.0-150000.3.8.1
- (no CPE)range: < 1.5.2-150000.4.10.1
- (no CPE)range: < 1.5.2-150000.4.10.1
- (no CPE)range: < 2.3.0-150000.3.8.1
- (no CPE)range: < 2.3.0-150000.3.8.1
- (no CPE)range: < 2.3.0-150000.3.8.1
- (no CPE)range: < 2.3.0-150000.3.8.1
- (no CPE)range: < 2.3.0-150000.3.8.1
- (no CPE)range: < 2.3.0-150000.3.8.1
- (no CPE)range: < 2.3.0-150000.3.8.1
- (no CPE)range: < 2.3.0-150000.3.8.1
- (no CPE)range: < 2.3.0-150000.3.8.1
- (no CPE)range: < 2.3.0-150000.3.8.1
- (no CPE)range: < 2.3.0-150000.3.8.1
- (no CPE)range: < 2.1.0-4.18.2
- (no CPE)range: < 2.1.0-4.18.2
- (no CPE)range: < 2.1.0-4.18.2
- (no CPE)range: < 2.1.0-4.18.2
- (no CPE)range: < 2.3.0-150000.3.8.1
- (no CPE)range: < 2.3.0-150000.3.8.1
- (no CPE)range: < 2.3.0-150000.3.8.1
- (no CPE)range: < 2.3.0-150000.3.8.1
- (no CPE)range: < 2.3.0-150000.3.8.1
- (no CPE)range: < 2.1.0-4.18.2
- (no CPE)range: < 2.1.0-4.18.2
- (no CPE)range: < 2.3.0-150000.3.8.1
- (no CPE)range: < 2.3.0-150000.3.8.1
- (no CPE)range: < 2.3.0-150000.3.8.1
- (no CPE)range: < 2.3.0-150000.3.8.1
- (no CPE)range: < 2.3.0-150000.3.8.1
- (no CPE)range: < 2.3.0-150000.3.8.1
- (no CPE)range: < 2.1.0-4.18.2
- (no CPE)range: < 2.1.0-4.18.2
- (no CPE)range: < 1.5.2-150000.4.10.1
- (no CPE)range: < 1.5.2-150000.4.10.1
- (no CPE)range: < 1.5.2-150000.4.10.1
- (no CPE)range: < 1.5.2-150000.4.10.1
- (no CPE)range: < 1.5.2-150000.4.10.1
- (no CPE)range: < 1.5.2-150000.4.10.1
- (no CPE)range: < 1.5.2-150000.4.10.1
- (no CPE)range: < 1.5.2-150000.4.10.1
- (no CPE)range: < 1.5.2-150000.4.10.1
- (no CPE)range: < 1.5.2-150000.4.10.1
Patches
0No patches discovered yet.
Vulnerability mechanics
Root cause
"Out-of-bounds read in opj_tgt_reset function leads to null pointer dereference."
Attack vector
An attacker provides a specially crafted image file to be processed by OpenJPEG's t2 encoder. The crafted input causes an out-of-bounds read in the `opj_tgt_reset` function, which results in a null pointer dereference [ref_id=1]. No authentication or special network access is required beyond delivering the malicious file to the application.
Affected code
The flaw resides in the `opj_tgt_reset` function in `lib/openjp2/tgt.c` of OpenJPEG versions prior to 2.4.0. A specially crafted file triggers an out-of-bounds read in this function, leading to a null pointer dereference [ref_id=1].
What the fix does
The upstream commit at https://github.com/uclouvain/openjpeg/pull/1296/commits/fbd30b064f8f9607d500437b6fedc41431fd6cdc addresses the issue [ref_id=1]. The patch prevents the out-of-bounds read in `opj_tgt_reset` that caused the null pointer dereference, ensuring the function handles crafted input safely.
Preconditions
- inputThe attacker must supply a specially crafted image file to an application using OpenJPEG.
- configThe application must process the crafted file through OpenJPEG's t2 encoder.
Generated on May 31, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
7- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/WJUPGIZE6A4O52EBOF75MCXJOL6MUCRV/mitrevendor-advisoryx_refsource_FEDORA
- security.gentoo.org/glsa/202101-29mitrevendor-advisoryx_refsource_GENTOO
- www.debian.org/security/2021/dsa-4882mitrevendor-advisoryx_refsource_DEBIAN
- bugzilla.redhat.com/show_bug.cgimitrex_refsource_MISC
- lists.debian.org/debian-lts-announce/2022/04/msg00006.htmlmitremailing-listx_refsource_MLIST
- www.oracle.com//security-alerts/cpujul2021.htmlmitrex_refsource_MISC
- www.oracle.com/security-alerts/cpuApr2021.htmlmitrex_refsource_MISC
News mentions
0No linked articles in our index yet.