{"id":"CVE-2023-2804","aliases":["CVE-2023-2804"],"related":[],"kind":"vulnerability","state":"published","title":"A heap-based buffer overflow issue was discovered in libjpeg-turbo in h2v2mergedupsampleinternal() function of jdmrgext.c file.","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"}],"published":"2023-05-25T00:00:00.000Z","modified":"2026-06-17T05:53:28.837Z","severity":{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H","score":6.5,"rating":"MEDIUM"},"severities":[{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H","score":6.5,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H","score":6.5,"rating":"MEDIUM"}],"cwes":["CWE-122","CWE-787"],"affected":[{"ranges":[{"version":"Fixed in libjpeg-turbo v3.0 (beta2)","status":"affected"}],"product":"libjpeg-turbo","source":"cvelist"},{"ranges":[{"status":"affected","version":"2.1.90"}],"vendor":"libjpeg-turbo","product":"libjpeg-turbo","cpe":"cpe:2.3:a:libjpeg-turbo:libjpeg-turbo:2.1.90:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/libjpeg-turbo/libjpeg-turbo/issues/675","tags":["exploit","issue-tracking","patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2208447","tags":["issue-tracking","patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://access.redhat.com/security/cve/CVE-2023-2804","tags":["third-party-advisory","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://github.com/libjpeg-turbo/libjpeg-turbo/commit/9f756bc67a84d4566bf74a0c2432aa55da404021","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://github.com/libjpeg-turbo/libjpeg-turbo/issues/668#issuecomment-1492586118","tags":["exploit","issue-tracking","patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://www.intel.com/content/www/us/en/security-center/advisory/intel-sa-01006.html","tags":["x-transferred"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"redhat","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2025-01-16T15:15:55.152Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2023-2804","url":"https://www.cve.org/CVERecord?id=CVE-2023-2804","licence":"CVE Terms of Use","modified":"2025-01-16T15:17:27.071Z"},{"source":"nvd","name":"NVD","id":"CVE-2023-2804","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-2804","licence":"Public domain","modified":"2026-06-17T05:53:28.837Z"}],"updatedAt":"2026-11-25T22:58:24.384Z","epss":{"score":0.012,"percentile":0.69028,"date":"2026-12-01T12:00:22.000Z"}}