CVE-2023-2804

Source
https://cve.org/CVERecord?id=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-25T00:00:00Z
Modified
2026-08-12T14:50:40.054693Z
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.

Database specific
{
    "cna_assigner": "redhat",
    "unresolved_ranges": [
        {
            "extracted_events": [
                {
                    "introduced": "Fixed in libjpeg-turbo v3.0 (beta2)"
                },
                {
                    "last_affected": "Fixed in libjpeg-turbo v3.0 (beta2)"
                }
            ],
            "source": "AFFECTED_FIELD"
        }
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/2xxx/CVE-2023-2804.json",
    "cwe_ids": [
        "CWE-122"
    ]
}
References

Affected packages

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

Affected ranges

Type
GIT
Repo
https://github.com/libjpeg-turbo/libjpeg-turbo
Events
Database specific
Show details
{
    "cpe": "cpe:2.3:a:libjpeg-turbo:libjpeg-turbo:2.1.90:*:*:*:*:*:*:*",
    "extracted_events": [
        {
            "introduced": "2.1.90"
        },
        {
            "last_affected": "2.1.90"
        }
    ],
    "source": [
        "CPE_STRING",
        "REFERENCES"
    ]
}

Affected versions

2.*
2.1.90
2.1.91

Database specific

vanir_signatures_modified
"2026-08-12T14:50:40Z"
vanir_signatures
[
    {
        "source": "https://github.com/libjpeg-turbo/libjpeg-turbo/commit/9f756bc67a84d4566bf74a0c2432aa55da404021",
        "target": {
            "function": "noscale",
            "file": "jdlossls.c"
        },
        "signature_version": "v1",
        "id": "CVE-2023-2804-2cf6521f",
        "signature_type": "Function",
        "deprecated": false,
        "digest": {
            "function_hash": "45893349253428892599678605874317640076",
            "length": 138.0
        }
    },
    {
        "source": "https://github.com/libjpeg-turbo/libjpeg-turbo/commit/9f756bc67a84d4566bf74a0c2432aa55da404021",
        "target": {
            "function": "simple_upscale",
            "file": "jdlossls.c"
        },
        "signature_version": "v1",
        "id": "CVE-2023-2804-41bd6fca",
        "signature_type": "Function",
        "deprecated": false,
        "digest": {
            "function_hash": "112376369083220100668902696318947702360",
            "length": 153.0
        }
    },
    {
        "source": "https://github.com/libjpeg-turbo/libjpeg-turbo/commit/9f756bc67a84d4566bf74a0c2432aa55da404021",
        "target": {
            "file": "jdlossls.c"
        },
        "signature_version": "v1",
        "id": "CVE-2023-2804-f12af71f",
        "signature_type": "Line",
        "deprecated": false,
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "264453119585316427186485396598254512130",
                "65582456727176366817468335422094827974",
                "30055463991005291524467097402588854178",
                "310651516989145847112025202950843573985",
                "107740660841104471832336593730836883285",
                "224351062765144820444831876706738103013",
                "320633655483827400771117174154721494510",
                "198497929741904313163517209949287782005",
                "211719071145529734302749623535903388273",
                "8154639209289213855050992008852297386",
                "271144142464856104214596135343707024446"
            ]
        }
    }
]
source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-2804.json"