CVE-2023-2804: libjpeg-turbo Heap-based Buffer Overflow
Vulnerability summary
CVE-2023-2804 is a medium (CVSS 6.5) Heap-based Buffer Overflow vulnerability in libjpeg-turbo. EPSS estimates a 1.20% chance of exploitation in the next 30 days, higher than 69.1% of scored vulnerabilities. 1 public exploit is recorded.
Not severe (CVSS 6.5, network access); no exploitation reported by the 5 checked sources
Source freshness unavailable
How is this decided?Advisory lineage
Upstream 0 · Downstream 0 · Duplicates 1 · Related 2Timeline
- 25-05-2023PublishedVulnerability first disclosed.
- 16-01-2025Last modifiedVulnerability information updated.
Description
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.
CVSS metrics
5 scores · 5 sources · 1 version- OSV · AlpineEcosystem advisory · calculated6.5MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
- OSV · WolfiEcosystem advisory · calculated6.5MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
- OSV · ChainguardEcosystem advisory · calculated6.5MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
- NVDNIST6.5MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
EPSS trend
Probability
1.20%
Chance of exploitation in the next 30 days
Percentile
69%
Versus all other CVEs
30-day change
No change 0.00 pp
From 1.20% on 04-11-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
1 foundLibjpeg Turbo
Maturity: poc
Weaknesses
CWE · root causeAffected systems
Known conditions: network-reachable, no authentication, user interaction (CVSS vector). Other conditions: not stated in public data.
Alpine1 product
- libjpeg-turbo< 2.1.5.1-r3 | < 2.1.5.1-r4
Chainguard1 product
- libjpeg-turbo< 2.1.91-r3
Libjpeg-turbo1 product
- libjpeg-turbo2.1.90
Opensuse1 product
- libjpeg-turbo&distro=openSUSE Tumbleweed< 8.3.2-77.1
Wolfi1 product
- libjpeg-turbo< 2.1.91-r3
5 vendors · 5 products