openjpeg: segmentation fault in opj2_decompress due to uninitialized pointer
Published Mar 29, 2022
5.5
MEDIUMCVSS 3.1
EPSS 1.10%
Description
A flaw was found in the opj2_decompress program in openjpeg2 2.4.0 in the way it handles an input directory with a large number of files. When it fails to allocate a buffer to store the filenames of the input directory, it calls free() on an uninitialized pointer, leading to a segmentation fault and a denial of service.
Affected products
- Vendor n/a Product Openjpeg2 Defaultn/a
- Version openjpeg2 version 2.4.0 and priorStatusaffectedConstraints-
- Version
Default status is the baseline for the product, each version can override it (e.g. patched versions marked unaffected).
| Vendor | Product | Default status | Versions | ||||||
|---|---|---|---|---|---|---|---|---|---|
| n/a | Openjpeg2 | n/a |
|
Configuration 2
- 34
- 35
- 36
Configuration 3
- 9.0
No data.
Red Hat Enterprise Linux 8
openjpeg2-0:2.4.0-5.el8
Fixed · RHSA-2022:7645
Red Hat Enterprise Linux 9
openjpeg2-0:2.4.0-7.el9
Fixed · RHSA-2022:8207
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
Not affected
Red Hat Enterprise Linux 8
inkscape:flatpak/openjpeg2
Not affected
Red Hat Enterprise Linux 8
libreoffice:flatpak/openjpeg2
Not affected
Red Hat Enterprise Linux 9
libreoffice:flatpak/openjpeg2
Not affected
| Product | Package | State | Advisory |
|---|---|---|---|
| Red Hat Enterprise Linux 8 | openjpeg2-0:2.4.0-5.el8 | Fixed | RHSA-2022:7645 |
| Red Hat Enterprise Linux 9 | openjpeg2-0:2.4.0-7.el9 | Fixed | RHSA-2022:8207 |
| 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 | Not affected | n/a |
| Red Hat Enterprise Linux 8 | inkscape:flatpak/openjpeg2 | Not affected | n/a |
| Red Hat Enterprise Linux 8 | libreoffice:flatpak/openjpeg2 | Not affected | n/a |
| Red Hat Enterprise Linux 9 | libreoffice:flatpak/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:N/I:N/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 2, 2026.
Score over time
2022–2026- EPSS v2
- EPSS v3
- EPSS v4
- EPSS v5
Percentile over time
- EPSS v2
- EPSS v3
- EPSS v4
- EPSS v5
Table of values (18 key points)
Flat stretches are collapsed; showing up to 120 newest points.
| Date | Score | Percentile | Model |
|---|---|---|---|
| Oct 2, 2026 | 1.10% (0.01104) | 64.58th | v5 (v2026.06.15) |
| Jun 15, 2026 | 1.08% (0.01078) | 60.56th | v5 (v2026.06.15) |
| Mar 17, 2025 | 0.06% (0.00064) | 17.25th | v4 (v2025.03.14) |
| Dec 12, 2024 | 0.14% (0.00145) | 51.95th | v3 (v2023.03.01) |
| Nov 4, 2023 | 0.08% (0.00082) | 34.26th | v3 (v2023.03.01) |
| Jul 4, 2023 | 0.07% (0.00070) | 28.85th | v3 (v2023.03.01) |
| May 1, 2023 | 0.05% (0.00053) | 19.19th | v3 (v2023.03.01) |
| Mar 7, 2023 | 0.04% (0.00045) | 12.08th | v3 (v2023.03.01) |
| Mar 6, 2023 | 1.11% (0.01108) | 55.18th | v2 (v2022.01.01) |
| Feb 22, 2023 | 1.11% (0.01108) | 54.89th | v2 (v2022.01.01) |
| Feb 13, 2023 | 2.15% (0.02150) | 79.58th | v2 (v2022.01.01) |
| Feb 3, 2023 | 5.13% (0.05132) | 89.25th | v2 (v2022.01.01) |
| Dec 29, 2022 | 2.15% (0.02150) | 79.48th | v2 (v2022.01.01) |
| Sep 7, 2022 | 1.11% (0.01108) | 53.41th | v2 (v2022.01.01) |
| Apr 14, 2022 | 1.02% (0.01018) | 37.02th | v2 (v2022.01.01) |
| Apr 11, 2022 | 0.95% (0.00954) | 32.60th | v2 (v2022.01.01) |
| Apr 1, 2022 | 0.89% (0.00885) | 24.24th | v2 (v2022.01.01) |
| Mar 30, 2022 | 0.89% (0.00885) | 11.60th | v2 (v2022.01.01) |
References (11)
- https://access.redhat.com/security/cve/CVE-2022-1122 Vendor Advisory
- https://bugzilla.redhat.com/show_bug.cgi?id=2067052 Issue Tracking
- https://github.com/uclouvain/openjpeg/issues/1368 x_refsource_MISCThird 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/MIWSQFQWXDU4MT3XTVAO6HC7TVL3NHS7/ vendor-advisoryx_refsource_FEDORA
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/RMKBAMK2CAM5TMC5TODKVCE5AAPTD5YV/ vendor-advisoryx_refsource_FEDORA
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ROSN5NRUFOH7HGLJ4ZSKPGAKLFXJALW4/ vendor-advisoryx_refsource_FEDORA
- https://nvd.nist.gov/vuln/detail/CVE-2022-1122
- https://security.gentoo.org/glsa/202209-04 vendor-advisoryx_refsource_GENTOOThird Party Advisory
- https://www.cve.org/CVERecord?id=CVE-2022-1122
Change history (0)
No recorded changes yet.