cve.bz

CVE-2023-2804 libjpeg-turbo libjpeg-turbo: Out-of-bounds Write

6.5 mediumExploit referenceEPSS 1.2%Fix available

Medium (6.5) in libjpeg-turbo libjpeg-turbo. EPSS 1.2% estimated probability of exploitation activity in the next 30 days.

On this page
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.

Severity

CVSS 3.1

6.5 medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
EPSS
1.2% (unchanged from 1.2% a week ago; 1.2% 30 days ago) estimated probability of exploitation activity in the next 30 days; 69th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: PoC · Automatable: no · Technical impact: partial, assessed 2025-01-16. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWEs
CWE-787 Out-of-bounds Write
CWE-122 Heap-based Buffer Overflow
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2023-2804 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2023-2804?via=ask-ai-copy and https://cve.bz/cve/CVE-2023-2804?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2023-2804 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
libjpeg-turbo:libjpeg-turbo2.1.90

Linux distributions

DistributionReleasePackageFixed inAdvisory
openSUSETumbleweedlibjpeg-turbo8.3.2-77.1openSUSE-SU-2024:13552-1
Alpinev3.18libjpeg-turbo2.1.5.1-r3ALPINE-CVE-2023-2804
Alpinev3.19, v3.20, v3.21 and 3 morelibjpeg-turbo2.1.5.1-r4ALPINE-CVE-2023-2804

From the distributions' data via OSV.dev: SUSE security data, CC BY 4.0; the Alpine secdb, CC BY-SA 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: openSUSE · Alpine.

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

This CVE does not affect libjpeg-turbo v2.1.x and prior. Red Hat Enterprise Linux ships libjpeg-turbo v2.0.90 and prior. Vulnerable code is not present in our code-base. Hence, it's not affected.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 6libjpeg-turboNot affected
Red Hat Enterprise Linux 7libjpeg-turboNot affected
Red Hat Enterprise Linux 8libjpeg-turboNot affected
Red Hat Enterprise Linux 9libjpeg-turboNot affected

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2023-2804.

Attack patterns (CAPEC)

  • CAPEC-92 Forced Integer Overflow Likelihood: High · Severity: High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON