Out-of-bounds Write Affecting libjpeg-turbo package, versions <2.1.5.1-r3


Severity

Recommended
0.0
medium
0
10

Snyk's Security Team recommends NVD's CVSS assessment. Learn more

Threat Intelligence

EPSS
0.62% (79th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-ALPINE318-LIBJPEGTURBO-5710351
  • published15 Jun 2023
  • disclosed25 May 2023

Introduced: 25 May 2023

CVE-2023-2804  (opens in a new tab)
CWE-787  (opens in a new tab)

How to fix?

Upgrade Alpine:3.18 libjpeg-turbo to version 2.1.5.1-r3 or higher.

NVD Description

Note: Versions mentioned in the description apply only to the upstream libjpeg-turbo package and not the libjpeg-turbo package as distributed by Alpine. See How to fix? for Alpine:3.18 relevant fixed versions and status.

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.

CVSS Scores

version 3.1