openjpeg: out-of-bounds write due to an integer overflow in opj_compress.c
Published Apr 14, 2021
6.2
MEDIUMCVSS 3.1
EPSS 1.56%
Description
Integer Overflow in OpenJPEG v2.4.0 allows remote attackers to crash the application, causing a Denial of Service (DoS). This occurs when the attacker uses the command line option "-ImgDir" on a directory that contains 1048576 files.
Affected products
No data.
Configuration 2
- 33
- 34
Configuration 3
- 9.0
No data.
Red Hat Enterprise Linux 8
openjpeg2-0:2.4.0-4.el8
Fixed · RHSA-2021:4251
Red Hat Enterprise Linux 6
openjpeg
Out of support scope
Red Hat Enterprise Linux 7
openjpeg
Out of support scope
Red Hat Enterprise Linux 7
openjpeg2
Out of support scope
Red Hat Enterprise Linux 8
gimp:flatpak/openjpeg2
Fix deferred
Red Hat Enterprise Linux 8
inkscape:flatpak/openjpeg2
Fix deferred
Red Hat Enterprise Linux 9
openjpeg2
Not affected
| Product | Package | State | Advisory |
|---|---|---|---|
| Red Hat Enterprise Linux 8 | openjpeg2-0:2.4.0-4.el8 | Fixed | RHSA-2021:4251 |
| Red Hat Enterprise Linux 6 | openjpeg | Out of support scope | n/a |
| Red Hat Enterprise Linux 7 | openjpeg | Out of support scope | n/a |
| Red Hat Enterprise Linux 7 | openjpeg2 | Out of support scope | n/a |
| Red Hat Enterprise Linux 8 | gimp:flatpak/openjpeg2 | Fix deferred | n/a |
| Red Hat Enterprise Linux 8 | inkscape:flatpak/openjpeg2 | Fix deferred | n/a |
| Red Hat Enterprise Linux 9 | openjpeg2 | Not affected | n/a |
No package ranges for this CVE.
Remediation
Red Hat statement
This flaw affects the opj2_compress utility but is not in the openjpeg2 library. Therefore, the attack vector is local to the opj2_compress utility and would require an attacker to convince a user to open a directory with an extremely large number of files using opj2_compress, or a script to be feeding such arbitrary, untrusted files to opj2_compress.
Metrics
No CVSS v4.0 score for this CVE.
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
1 other source (Red Hat) ▾
CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:H
No CVSS v3.0 score for this CVE.
AV:N/AC:M/Au:N/C:N/I:N/A:P
This CVE is not in the KEV list.
No CISA SSVC assessment for this CVE yet.
Estimated probability of exploitation in the wild in the next 30 days (FIRST EPSS). As of Oct 1, 2026.
Score over time
2021–2026- EPSS v1
- EPSS v5
- EPSS v2
- EPSS v3
Percentile over time
- EPSS v1
- EPSS v5
- EPSS v2
- EPSS v3
Table of values (14 key points)
Flat stretches are collapsed; showing up to 120 newest points.
| Date | Score | Percentile | Model |
|---|---|---|---|
| Oct 1, 2026 | 1.56% (0.01560) | 74.33th | v5 (v2026.06.15) |
| Sep 20, 2026 | 1.56% (0.01560) | 74.12th | v5 (v2026.06.15) |
| Jul 20, 2024 | 0.22% (0.00222) | 60.99th | v3 (v2023.03.01) |
| Dec 29, 2023 | 0.22% (0.00222) | 60.52th | v3 (v2023.03.01) |
| Nov 19, 2023 | 0.21% (0.00209) | 58.73th | v3 (v2023.03.01) |
| Nov 8, 2023 | 0.20% (0.00202) | 57.93th | v3 (v2023.03.01) |
| Sep 3, 2023 | 0.16% (0.00157) | 51.50th | v3 (v2023.03.01) |
| Mar 7, 2023 | 0.11% (0.00110) | 42.47th | v3 (v2023.03.01) |
| Mar 6, 2023 | 1.21% (0.01213) | 66.61th | v2 (v2022.01.01) |
| Feb 4, 2022 | 1.51% (0.01512) | 50.79th | v2 (v2022.01.01) |
| Feb 3, 2022 | 5.58% (0.05581) | 80.18th | v1 |
| Jan 6, 2022 | 5.58% (0.05581) | 79.98th | v1 |
| Jan 5, 2022 | 1.30% (0.01300) | 70.52th | v5 (v2026.06.15) |
| Apr 15, 2021 | 0.65% (0.00651) | 0.00th | v1 |
References (10)
- https://access.redhat.com/security/cve/CVE-2021-29338 Vendor Advisory
- https://bugzilla.redhat.com/show_bug.cgi?id=1950101 Issue Tracking
- https://github.com/uclouvain/openjpeg/issues/1338 x_refsource_MISCExploitIssue TrackingPatchThird Party Advisory
- https://lists.debian.org/debian-lts-announce/2022/04/msg00006.html mailing-listx_refsource_MLISTMailing ListThird Party Advisory
- https://lists.debian.org/debian-lts-announce/2025/04/msg00002.html
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/EZ54FGM2IGAP4AWSJ22JKHOPHCR3FGYU/ vendor-advisoryx_refsource_FEDORA
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/QB6AI7CWXWMEDZIQY4LQ6DMIEXMDOHUP/ vendor-advisoryx_refsource_FEDORA
- https://nvd.nist.gov/vuln/detail/CVE-2021-29338
- https://security.gentoo.org/glsa/202209-04 vendor-advisoryx_refsource_GENTOOThird Party Advisory
- https://www.cve.org/CVERecord?id=CVE-2021-29338
| Link | Providers | Tags |
|---|---|---|
| https://access.redhat.com/security/cve/CVE-2021-29338 | Vendor Advisory | |
| https://bugzilla.redhat.com/show_bug.cgi?id=1950101 | Issue Tracking | |
| https://github.com/uclouvain/openjpeg/issues/1338 | x_refsource_MISCExploitIssue TrackingPatchThird Party Advisory | |
| https://lists.debian.org/debian-lts-announce/2022/04/msg00006.html | mailing-listx_refsource_MLISTMailing ListThird Party Advisory | |
| https://lists.debian.org/debian-lts-announce/2025/04/msg00002.html | ||
| https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/EZ54FGM2IGAP4AWSJ22JKHOPHCR3FGYU/ | vendor-advisoryx_refsource_FEDORA | |
| https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/QB6AI7CWXWMEDZIQY4LQ6DMIEXMDOHUP/ | vendor-advisoryx_refsource_FEDORA | |
| https://nvd.nist.gov/vuln/detail/CVE-2021-29338 | ||
| https://security.gentoo.org/glsa/202209-04 | vendor-advisoryx_refsource_GENTOOThird Party Advisory | |
| https://www.cve.org/CVERecord?id=CVE-2021-29338 |
Change history (0)
No recorded changes yet.