Vulnerability · Published May 25, 2023 · Assigned by redhat
CVE-2023-2804
Medium 6.5
In plain English
A medium-severity heap buffer overflow in libjpeg-turbo. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 1.2% (higher than 68% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official 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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine:v3.20 | libjpeg-turbo | 2.1.5.1-r4 | ALPINE-CVE-2023-2804 |
| Alpine:v3.21 | libjpeg-turbo | 2.1.5.1-r4 | ALPINE-CVE-2023-2804 |
| Alpine:v3.22 | libjpeg-turbo | 2.1.5.1-r4 | ALPINE-CVE-2023-2804 |
| Alpine:v3.23 | libjpeg-turbo | 2.1.5.1-r4 | ALPINE-CVE-2023-2804 |
| Alpine:v3.24 | libjpeg-turbo | 2.1.5.1-r4 | ALPINE-CVE-2023-2804 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| n/a | libjpeg-turbo | Fixed in libjpeg-turbo v3.0 (beta2) |
Weakness: CWE-122 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
References
- https://github.com/libjpeg-turbo/libjpeg-turbo/issues/675
- https://bugzilla.redhat.com/show_bug.cgi?id=2208447
- https://access.redhat.com/security/cve/CVE-2023-2804
- https://github.com/libjpeg-turbo/libjpeg-turbo/commit/9f756bc67a84d4566bf74a0c2432aa55da404021
- https://github.com/libjpeg-turbo/libjpeg-turbo/issues/668#issuecomment-1492586118
- https://www.intel.com/content/www/us/en/security-center/advisory/intel-sa-01006.html