CVE-2023-2804: A heap-based buffer overflow issue was discovered in libjpeg-turbo in h2v2_merged_upsample_internal() function
CVE-2023-2804 is a medium-severity flaw (CVSS 6.5) affecting libjpeg-turbo. Below: why it ranks where it does, which versions are affected, what to do, and the exact commands.
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 upsamplin
Why this priority
- Public exploit reference
No fix is published yet: follow the downgrade or mitigation steps.
Last updated 2026-06-17 · Sources: CVE Program, NVD, CISA KEV, EPSS and vendor advisories · How we score
Am I affected?
Timeline
- Published CVE record published
- Updated Record last modified
Scores and fixes here are computed automatically from those and other public sources. Confirm with the vendor advisory before changing production systems.
Quick answers
How do I fix CVE-2023-2804?
libjpeg-turbo: downgrade or apply the listed mitigation. Exact commands for each OS are on this page.
Is CVE-2023-2804 being exploited?
CVE-2023-2804 is not on the CISA Known Exploited Vulnerabilities list at the time of the last update. Check again, as this can change.
What does CVE-2023-2804 affect?
CVE-2023-2804 affects libjpeg-turbo. Severity is medium (CVSS 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 typ
How urgent is CVE-2023-2804?
Priority 45/100. Public exploit reference
Related CVEs
- CVE-2021-46822 MEDIUM 5.5 UPGRADE The PPM reader in libjpeg-turbo through 2.0.90 mishandles use of tjLoadImage for loading a 16-bit binary PPM f
- CVE-2021-29390 HIGH 7.1 DOWNGRADE MITIGATE libjpeg-turbo version 2.0.90 has a heap-based buffer over-read (2 bytes) in decompress_smooth_data in jdcoefct
- CVE-2020-35538 MEDIUM 5.5 DOWNGRADE A crafted input file could cause a null pointer dereference in jcopy_sample_rows() when processed by libjpeg-t