CVE-2021-3575
Description
A heap-based buffer overflow in openjpeg's color.c allows arbitrary code execution via a crafted .j2k file.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
A heap-based buffer overflow in openjpeg's color.c allows arbitrary code execution via a crafted .j2k file.
Vulnerability
A heap-based buffer overflow exists in OpenJPEG's color.c at line 379:42 in the sycc420_to_rgb function. The vulnerability occurs when decompressing a specially crafted .j2k file. Insufficient validation of the cb pointer leads to an out-of-bounds read. Affected versions include the latest release v2.4.0 and the current master branch (commit 0bda718) [1][2][3].
Exploitation
An attacker can exploit this vulnerability by providing a malicious .j2k file to an application that uses OpenJPEG for decompression. No authentication or special network position is required; the attack vector is local or remote if the application accepts user-supplied files. The user must trigger decompression of the crafted file (e.g., by opening it in an image viewer or using opj_decompress). The crash analysis shows a heap-buffer-overflow read of size 4 at color.c:379:42 [3].
Impact
Successful exploitation can lead to arbitrary code execution with the privileges of the application linked against OpenJPEG. The overflow is a read of 4 bytes beyond the allocated heap buffer, which can be leveraged by an attacker to corrupt memory and achieve code execution. The impact includes potential denial of service or full compromise of the affected system [1][2].
Mitigation
As of the latest available references (May 2023), no official patch has been committed to the OpenJPEG repository. A proposed fix exists in pull request #1362, but it has not been merged [1]. Users are advised to monitor the OpenJPEG project for updates and apply any future patches. No workaround is documented. The vulnerability is not listed in CISA's Known Exploited Vulnerabilities catalog.
AI Insight generated on May 25, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected products
6- openjpeg/openjpegdescription
- osv-coords4 versionspkg:rpm/almalinux/openjpeg2pkg:rpm/almalinux/openjpeg2-develpkg:rpm/almalinux/openjpeg2-devel-docspkg:rpm/almalinux/openjpeg2-tools
< 2.4.0-4.el8+ 3 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
Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
5- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/EZ54FGM2IGAP4AWSJ22JKHOPHCR3FGYU/mitrevendor-advisoryx_refsource_FEDORA
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/QB6AI7CWXWMEDZIQY4LQ6DMIEXMDOHUP/mitrevendor-advisoryx_refsource_FEDORA
- bugzilla.redhat.com/show_bug.cgimitrex_refsource_MISC
- github.com/uclouvain/openjpeg/issues/1347mitrex_refsource_MISC
- ubuntu.com/security/CVE-2021-3575mitrex_refsource_MISC
News mentions
0No linked articles in our index yet.