CVE-2023-2804

Source
https://nvd.nist.gov/vuln/detail/CVE-2023-2804
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-2804.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2023-2804
Downstream
Related
Published
2023-05-25T22:15:09.443Z
Modified
2025-11-20T12:16:54.549811Z
Severity
  • 6.5 (Medium) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H CVSS Calculator
Summary
[none]
Details

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

References

Affected packages

Git / github.com/libjpeg-turbo/libjpeg-turbo

Affected ranges

Type
GIT
Repo
https://github.com/libjpeg-turbo/libjpeg-turbo
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Fixed

Affected versions

0.*

0.0.90
0.0.91
0.0.93

1.*

1.0.0
1.0.1
1.0.90
1.1.0
1.1.1
1.1.90
1.2.0
1.2.1
1.2.90
1.3.0
1.3.1
1.3.90
1.4.0
1.4.1
1.4.2
1.4.90
1.5.0
1.5.1
1.5.2
1.5.3
1.5.90

2.*

2.0.0
2.0.1
2.0.2
2.0.3
2.0.4
2.0.5
2.0.6
2.0.90
2.1.0
2.1.1
2.1.2
2.1.3
2.1.4
2.1.5
2.1.90
2.1.91

Other

jpeg-1
jpeg-2
jpeg-3
jpeg-4
jpeg-4a
jpeg-5
jpeg-5a
jpeg-5b
jpeg-6
jpeg-6a
jpeg-6b
jpeg-6bl
jpeg-6bl-drc
jpeg-6bx
jpeg-7
jpeg-8
jpeg-8a
jpeg-8b
jpeg-8c
jpeg-8d
jpeg-9
jpeg-9a
jpeg-9b
jpeg-9c
jpeg-9d
jpeg-ari

Database specific

vanir_signatures

[
    {
        "digest": {
            "length": 138.0,
            "function_hash": "45893349253428892599678605874317640076"
        },
        "id": "CVE-2023-2804-2cf6521f",
        "source": "https://github.com/libjpeg-turbo/libjpeg-turbo/commit/9f756bc67a84d4566bf74a0c2432aa55da404021",
        "signature_type": "Function",
        "target": {
            "file": "jdlossls.c",
            "function": "noscale"
        },
        "signature_version": "v1",
        "deprecated": false
    },
    {
        "digest": {
            "length": 153.0,
            "function_hash": "112376369083220100668902696318947702360"
        },
        "id": "CVE-2023-2804-41bd6fca",
        "source": "https://github.com/libjpeg-turbo/libjpeg-turbo/commit/9f756bc67a84d4566bf74a0c2432aa55da404021",
        "signature_type": "Function",
        "target": {
            "file": "jdlossls.c",
            "function": "simple_upscale"
        },
        "signature_version": "v1",
        "deprecated": false
    },
    {
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "264453119585316427186485396598254512130",
                "65582456727176366817468335422094827974",
                "30055463991005291524467097402588854178",
                "310651516989145847112025202950843573985",
                "107740660841104471832336593730836883285",
                "224351062765144820444831876706738103013",
                "320633655483827400771117174154721494510",
                "198497929741904313163517209949287782005",
                "211719071145529734302749623535903388273",
                "8154639209289213855050992008852297386",
                "271144142464856104214596135343707024446"
            ]
        },
        "id": "CVE-2023-2804-f12af71f",
        "source": "https://github.com/libjpeg-turbo/libjpeg-turbo/commit/9f756bc67a84d4566bf74a0c2432aa55da404021",
        "signature_type": "Line",
        "target": {
            "file": "jdlossls.c"
        },
        "signature_version": "v1",
        "deprecated": false
    }
]

source

"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-2804.json"