CVE-2023-2804: Buffer Overflow

Published Mar 26, 2023
·
Updated

A heap-based buffer overflow issue was discovered in libjpeg-turbo in h2v2mergedupsampleinternal() 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.

Other sources

A heap-based buffer overflow issue was found in libjpeg-turbo in the h2v2mergedupsampleinternal() function in the jdmrgext.c file. This issue can only be used with 12-bit data precision for which the range of the sample data type exceeds the valid sample range. This could allow an attacker to craft a 12-bit lossless JPEG image that contains out-of-range 12-bit samples. An application attempting to decompress such an image using merged upsampling would lead to segmentation fault or buffer overflows, causing an application to crash.

A heap‑based buffer overflow exists in libjpeg‑turbo’s h2v2mergedupsampleinternal() function when processing 12‑bit lossless JPEG images. An attacker could craft an image containing out‑of‑range 12‑bit samples that, when decompressed with merged upsampling enabled, may trigger a segmentation fault or buffer overflow, resulting in an application crash.

Microsoft

In libjpeg-turbo, there is heap-buffer-overflow at /libjpeg-turbo/jdmrgext.c:126 in h2v2mergedupsampleinternal(), leadin causing crash.

https://github.com/libjpeg-turbo/libjpeg-turbo/issues/675 https://github.com/libjpeg-turbo/libjpeg-turbo/commit/9f756bc67a84d4566bf74a0c2432aa55da404021

Red Hat

Red Hat, Inc. CVE-2023-2804: Heap Based Overflow libjpeg-turbo

Microsoft

Affected Software

4 affected componentsFixes available
redhat/libjpeg-turbo<3.0
3.0
Libjpeg-turbo Libjpeg-turbo=2.1.90
Libjpeg-turbo Libjpeg-turbo<2.1.91
Microsoft Windows Server 2022, 23H2 Edition

Event History

Mar 26, 2023
CVE Published
12:00 AM
Data Sourced
12:00 AM
RemedyDescriptionSeverityWeakness
May 25, 2023
CVE Published
via MITRE·12:00 AM
Data Sourced
via MITRE·12:00 AM
DescriptionWeakness
Feb 10, 2026
Data Sourced
via Microsoft·04:00 PM
DescriptionSeverityWeaknessAffected Software
Updated
via Microsoft·04:00 PM
Description
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the vulnerability ID for this issue?

The vulnerability ID for this issue is CVE-2023-2804.

2

What is the severity of CVE-2023-2804?

The severity of CVE-2023-2804 is medium with a severity value of 6.5.

3

Which software is affected by CVE-2023-2804?

Libjpeg-turbo versions up to 2.1.91 and 2.1.90, as well as version 3.0, are affected by CVE-2023-2804.

4

What is the description of CVE-2023-2804?

CVE-2023-2804 is a heap-based buffer overflow issue in libjpeg-turbo, specifically in the h2v2_merged_upsample_internal() function in the jdmrgext.c file.

5

How can an attacker exploit CVE-2023-2804?

An attacker can exploit CVE-2023-2804 by using 12-bit data precision, causing the range of the sample data type to exceed the valid sample range.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203