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.
What to do
Fixed builds are available from Alpine, Microsoft: see the table below for the fixed version per release.
Ubuntu has not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 22.04 | libjpeg-turbo | Not affected vulnerable_code_not_present | ||
| Ubuntu 22.04 | libjpeg6b | Not affected vulnerable_code_not_present | ||
| Ubuntu 22.04 | libjpeg9 | Not affected vulnerable_code_not_present | ||
| Ubuntu 20.04 | libjpeg-turbo | Not affected vulnerable_code_not_present | ||
| Ubuntu 20.04 | libjpeg6b | Not affected vulnerable_code_not_present | ||
| Ubuntu 20.04 | libjpeg9 | Not affected vulnerable_code_not_present | ||
| Ubuntu 18.04 | libjpeg-turbo | Fix pending | ||
| Ubuntu 18.04 | libjpeg6b | Fix pending | ||
| Ubuntu 18.04 | libjpeg9 | Fix pending | ||
| Ubuntu 16.04 | libjpeg-turbo | Fix pending | ||
| Ubuntu 16.04 | libjpeg6b | Fix pending | ||
| Ubuntu 16.04 | libjpeg9 | Fix pending | ||
| Red Hat Enterprise Linux 9 | libjpeg-turbo | Not affected | ||
| Red Hat Enterprise Linux 9 | libjpeg-turbo-devel | Not affected | ||
| Red Hat Enterprise Linux 9 | libjpeg-turbo-utils | Not affected | ||
| Red Hat Enterprise Linux 9 | turbojpeg | Not affected | ||
| Red Hat Enterprise Linux 9 | turbojpeg-devel | Not affected | ||
| Red Hat Enterprise Linux 8 | libjpeg-turbo | Not affected | ||
| Red Hat Enterprise Linux 8 | libjpeg-turbo-devel | Not affected | ||
| Red Hat Enterprise Linux 8 | libjpeg-turbo-utils | Not affected | ||
| Red Hat Enterprise Linux 8 | turbojpeg | Not affected | ||
| Red Hat Enterprise Linux 8 | turbojpeg-devel | Not affected | ||
| Red Hat Enterprise Linux 7 | libjpeg-turbo | Not affected | ||
| Red Hat Enterprise Linux 7 | libjpeg-turbo-devel | Not affected | ||
| Red Hat Enterprise Linux 7 | libjpeg-turbo-static | Not affected | ||
| Red Hat Enterprise Linux 7 | libjpeg-turbo-utils | Not affected | ||
| Red Hat Enterprise Linux 7 | turbojpeg | Not affected | ||
| Red Hat Enterprise Linux 7 | turbojpeg-devel | Not affected | ||
| Red Hat Enterprise Linux 6 | libjpeg-turbo | Not affected | ||
| Red Hat Enterprise Linux 6 | libjpeg-turbo-devel | Not affected | ||
| Red Hat Enterprise Linux 6 | libjpeg-turbo-static | Not affected | ||
| Windows Server, version 23H2 | windows | Fixed | 10.0.25398.2149 KB5075897 | MSRC-2026-Feb |
| Alpine Linux 3.24 | libjpeg-turbo | Fixed | 2.1.5.1-r4 | ALPINE-CVE-2023-2804 |
| Alpine Linux 3.23 | libjpeg-turbo | Fixed | 2.1.5.1-r4 | ALPINE-CVE-2023-2804 |
| Alpine Linux 3.22 | libjpeg-turbo | Fixed | 2.1.5.1-r4 | ALPINE-CVE-2023-2804 |
| Alpine Linux 3.21 | libjpeg-turbo | Fixed | 2.1.5.1-r4 | ALPINE-CVE-2023-2804 |
| Alpine Linux 3.20 | libjpeg-turbo | Fixed | 2.1.5.1-r4 | ALPINE-CVE-2023-2804 |
| Alpine Linux 3.19 | libjpeg-turbo | Fixed | 2.1.5.1-r4 | ALPINE-CVE-2023-2804 |
| Alpine Linux 3.18 | libjpeg-turbo | Fixed | 2.1.5.1-r3 | ALPINE-CVE-2023-2804 |
What the vendor says
As published in the CVE record by redhat, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- libjpeg-turbo: affected: Fixed in libjpeg-turbo v3.0 (beta2)
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
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.