CVE-2023-2804
A heap-based buffer overflow issue was discovered in libjpeg-turbo in...
A heap-based buffer overflow issue was discovered in libjpeg-turbo in h2v2_merged_upsample_internal() function of jdmrgext.c file. The vulnerability can only be exploited with 12-bit data precision for which the range of the sample data type exceeds the valid sample range, hence, an attacker could craft a 12-bit lossless JPEG image that contains out-of-range 12-bit samples. An application attempting to decompress such image using merged upsampling would lead to segmentation fault or buffer overflows, causing an application to crash.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- Required
What an attacker can affect
- Confidentiality
- None
- Integrity
- None
- Availability
- High
Exploit likelihood
What each source reports
NVD Score used
6.5
A heap-based buffer overflow issue was discovered in libjpeg-turbo in h2v2_merged_upsample_internal() function of jdmrgext.c file. The vulnerability can only be exploited with 12-bit data precision for which the range of the sample data type exceeds the valid sample range, hence, an attacker could craft a 12-bit lossless JPEG image that contains out-of-range 12-bit samples. An application attempting to decompress such image using merged upsampling would lead to segmentation fault or buffer overflows, causing an application to crash.
- Record
CVE-2023-2804- CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H - Weakness
- CWE-122, CWE-787
- Updated
- 2026-11-02
CVE List
6.5
A heap-based buffer overflow issue was discovered in libjpeg-turbo in h2v2_merged_upsample_internal() function of jdmrgext.c file. The vulnerability can only be exploited with 12-bit data precision for which the range of the sample data type exceeds the valid sample range, hence, an attacker could craft a 12-bit lossless JPEG image that contains out-of-range 12-bit samples. An application attempting to decompress such image using merged upsampling would lead to segmentation fault or buffer overflows, causing an application to crash.
- Record
CVE-2023-2804- CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H - Weakness
- CWE-122
- Updated
- 2026-11-02
EUVDEUVD-2023-34257
6.5
A heap-based buffer overflow issue was discovered in libjpeg-turbo in h2v2_merged_upsample_internal() function of jdmrgext.c file. The vulnerability can only be exploited with 12-bit data precision for which the range of the sample data type exceeds the valid sample range, hence, an attacker could craft a 12-bit lossless JPEG image that contains out-of-range 12-bit samples. An application attempting to decompress such image using merged upsampling would lead to segmentation fault or buffer overflows, causing an application to crash.
- Record
EUVD-2023-34257- CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H - Updated
- 2026-11-03
GitHub AdvisoriesGHSA-jv36-3qpq-7g23
6.5
A heap-based buffer overflow issue was discovered in libjpeg-turbo in...
A heap-based buffer overflow issue was discovered in libjpeg-turbo in h2v2_merged_upsample_internal() function of jdmrgext.c file. The vulnerability can only be exploited with 12-bit data precision for which the range of the sample data type exceeds the valid sample range, hence, an attacker could craft a 12-bit lossless JPEG image that contains out-of-range 12-bit samples. An application attempting to decompress such image using merged upsampling would lead to segmentation fault or buffer overflows, causing an application to crash.
- Record
GHSA-jv36-3qpq-7g23- CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H - Weakness
- CWE-122, CWE-787
- Updated
- 2026-11-02
OSVALPINE-CVE-2023-2804
6.5
A heap-based buffer overflow issue was discovered in libjpeg-turbo in h2v2_merged_upsample_internal() function of jdmrgext.c file. The vulnerability can only be exploited with 12-bit data precision for which the range of the sample data type exceeds the valid sample range, hence, an attacker could craft a 12-bit lossless JPEG image that contains out-of-range 12-bit samples. An application attempting to decompress such image using merged upsampling would lead to segmentation fault or buffer overflows, causing an application to crash.
- Record
ALPINE-CVE-2023-2804- CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
OSVBELL-CVE-2023-2804
6.5
CVE-2023-2804 does not affect BellSoft software
- Record
BELL-CVE-2023-2804- CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
OSV
6.5
A heap-based buffer overflow issue was discovered in libjpeg-turbo in h2v2_merged_upsample_internal() function of jdmrgext.c file. The vulnerability can only be exploited with 12-bit data precision for which the range of the sample data type exceeds the valid sample range, hence, an attacker could craft a 12-bit lossless JPEG image that contains out-of-range 12-bit samples. An application attempting to decompress such image using merged upsampling would lead to segmentation fault or buffer overflows, causing an application to crash.
- Record
CVE-2023-2804- CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H - Weakness
- CWE-122
- Updated
- 2026-11-02
OSVopenSUSE-SU-2024:13552-1 No score
libjpeg-turbo-3.0.1-77.1 on GA media
These are all security issues fixed in the libjpeg-turbo-3.0.1-77.1 package on the GA media of openSUSE Tumbleweed.
- Record
openSUSE-SU-2024:13552-1- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
libjpeg-turboAlpine:v3.18 |
before 2.1.5.1-r3 | 2.1.5.1-r3 |
libjpeg-turboAlpine:v3.19 |
before 2.1.5.1-r4 | 2.1.5.1-r4 |
libjpeg-turboAlpine:v3.20 |
before 2.1.5.1-r4 | 2.1.5.1-r4 |
libjpeg-turboAlpine:v3.21 |
before 2.1.5.1-r4 | 2.1.5.1-r4 |
libjpeg-turboAlpine:v3.22 |
before 2.1.5.1-r4 | 2.1.5.1-r4 |
libjpeg-turboAlpine:v3.23 |
before 2.1.5.1-r4 | 2.1.5.1-r4 |
libjpeg-turboAlpine:v3.24 |
before 2.1.5.1-r4 | 2.1.5.1-r4 |
libjpeg-turboopenSUSE:Tumbleweed |
before 8.3.2-77.1 | 8.3.2-77.1 |
History
| Recorded | Changed | Sources |
|---|---|---|
| aliases, products | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2023-2804 is a medium vulnerability (CVSS 6.5) in Libjpeg-turbo, published May 25, 2023. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 1.20%, the 68th percentile. Fixed in libjpeg-turbo 2.1.5.1-r3.
References
github.com/libjpeg-turbo/libjpeg-turbo/issues/675
bugzilla.redhat.com/show_bug.cgi?id=2208447
access.redhat.com/security/cve/CVE-2023-2804
github.com/libjpeg-turbo/libjpeg-turbo/commit/9f756bc67a84d4566bf74a0c2432aa55da404021
github.com/libjpeg-turbo/libjpeg-turbo/issues/668
intel.com/content/www/us/en/security-center/advisory/intel-sa-01006.html