CVE-2023-2804
CVE-2023-2804 is a medium-severity vulnerability in Libjpeg-turbo with a CVSS 3.x base score of 6.5. It is not currently listed as actively exploited by CISA, and its EPSS exploit-prediction score is low. The underlying weakness is classified as CWE-787.
Key facts
- Severity: Medium (CVSS 3.x base score 6.5)
- EPSS exploit prediction: 1% (64th percentile)
- Actively exploited: Not listed in CISA KEV
- Weakness: CWE-787
- Affected product: Libjpeg-turbo
- Published:
- Last modified:
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.
Frequently asked questions
- What is CVE-2023-2804?
- 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.
- How severe is CVE-2023-2804?
- CVE-2023-2804 has a CVSS 3.x base score of 6.5, rated medium severity. It is exploitable over network with low attack complexity, requires no privileges and user interaction. Impact on confidentiality is none, integrity none, and availability high.
- Is CVE-2023-2804 being actively exploited?
- It is not currently listed in CISA's KEV catalog. Its EPSS exploit-prediction score is 1% (64th percentile), an estimate of the probability of exploitation in the next 30 days.
- What products are affected by CVE-2023-2804?
- CVE-2023-2804 affects Libjpeg-turbo. See the affected-products list for the exact vulnerable versions.
- How do I fix CVE-2023-2804?
- Review the linked vendor and NVD advisories for patched versions and mitigations, then upgrade or apply the recommended workaround.
- When was CVE-2023-2804 published?
- CVE-2023-2804 was published on 2023-05-25 and last updated on 2026-06-17.
References
- https://access.redhat.com/security/cve/CVE-2023-2804
- https://bugzilla.redhat.com/show_bug.cgi?id=2208447
- https://github.com/libjpeg-turbo/libjpeg-turbo/commit/9f756bc67a84d4566bf74a0c2432aa55da404021
- https://github.com/libjpeg-turbo/libjpeg-turbo/issues/668#issuecomment-1492586118
- https://github.com/libjpeg-turbo/libjpeg-turbo/issues/675
- https://www.intel.com/content/www/us/en/security-center/advisory/intel-sa-01006.html
Affected products (1)
- cpe:2.3:a:libjpeg-turbo:libjpeg-turbo:2.1.90:*:*:*:*:*:*:*
More vulnerabilities in Libjpeg-turbo
- CVE-2020-17541 — High (CVSS 8.8): Libjpeg-turbo all version have a stack-based buffer overflow in the "transform" component. A remote attacker can send a…
- CVE-2018-20330 — High (CVSS 8.8): The tjLoadImage function in libjpeg-turbo 2.0.1 has an integer overflow with a resultant heap-based buffer overflow via…
- CVE-2016-3616 — High (CVSS 8.8): The cjpeg utility in libjpeg allows remote attackers to cause a denial of service (NULL pointer dereference and…
- CVE-2020-13790 — High (CVSS 8.1): libjpeg-turbo 2.0.4, and mozjpeg 4.0.0, has a heap-based buffer over-read in get_rgb_row() in rdppm.c via a malformed…
- CVE-2021-29390 — High (CVSS 7.1): libjpeg-turbo version 2.0.90 has a heap-based buffer over-read (2 bytes) in decompress_smooth_data in jdcoefct.c.
- CVE-2021-20205 — Medium (CVSS 6.5): Libjpeg-turbo versions 2.0.91 and 2.0.90 is vulnerable to a denial of service vulnerability caused by a divide by zero…
All CVEs affecting Libjpeg-turbo →
Other CWE-787 (Out-of-bounds Write) vulnerabilities
- CVE-2026-42369 — Critical (CVSS 10.0): GV-VMS V20 is a Video Monitoring Software used to gather the feeds of many surveillance cameras and manage other…
- CVE-2026-4746 — Critical (CVSS 10.0): Out-of-bounds Write vulnerability in timeplus-io proton (base/poco/Foundation/src modules). This vulnerability is…
- CVE-2025-43300 — Critical (CVSS 10.0): An out-of-bounds write issue was addressed with improved bounds checking. This issue is fixed in iOS 15.8.5 and iPadOS…
- CVE-2025-24201 — Critical (CVSS 10.0): An out-of-bounds write issue was addressed with improved checks to prevent unauthorized actions. This issue is fixed in…
- CVE-2024-42479 — Critical (CVSS 10.0): llama.cpp provides LLM inference in C/C++. The unsafe `data` pointer member in the `rpc_tensor` structure can cause…
- CVE-2024-39791 — Critical (CVSS 10.0): Stack-based buffer overflow vulnerabilities affecting Vonets industrial wifi bridge relays and wifi bridge…