CVE-2026-5318

Source
https://cve.org/CVERecord?id=CVE-2026-5318
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-5318.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2026-5318
Downstream
Published
2026-04-02T01:45:12.421Z
Modified
2026-08-12T16:41:07.760896Z
Severity
  • 2.1 (Low) CVSS_V4 - CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:P CVSS Calculator
Summary
LibRaw JPEG DHT losslessjpeg.cpp initval out-of-bounds write
Details

A weakness has been identified in LibRaw up to 0.22.0. This impacts the function HuffTable::initval of the file src/decompressors/losslessjpeg.cpp of the component JPEG DHT Parser. This manipulation of the argument bits[] causes out-of-bounds write. It is possible to initiate the attack remotely. The exploit has been made available to the public and could be used for attacks. Upgrading to version 0.22.1 will fix this issue. Patch name: a6734e867b19d75367c05f872ac26322464e3995. It is advisable to upgrade the affected component.

Database specific
{
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/5xxx/CVE-2026-5318.json",
    "unresolved_ranges": [
        {
            "source": "AFFECTED_FIELD",
            "extracted_events": [
                {
                    "introduced": "0.1"
                },
                {
                    "last_affected": "0.1"
                },
                {
                    "introduced": "0.2"
                },
                {
                    "last_affected": "0.2"
                },
                {
                    "introduced": "0.3"
                },
                {
                    "last_affected": "0.3"
                },
                {
                    "introduced": "0.4"
                },
                {
                    "last_affected": "0.4"
                },
                {
                    "introduced": "0.5"
                },
                {
                    "last_affected": "0.5"
                },
                {
                    "introduced": "0.6"
                },
                {
                    "last_affected": "0.6"
                },
                {
                    "introduced": "0.7"
                },
                {
                    "last_affected": "0.7"
                },
                {
                    "introduced": "0.8"
                },
                {
                    "last_affected": "0.8"
                },
                {
                    "introduced": "0.9"
                },
                {
                    "last_affected": "0.9"
                },
                {
                    "introduced": "0.10"
                },
                {
                    "last_affected": "0.10"
                }
            ]
        }
    ],
    "cwe_ids": [
        "CWE-119",
        "CWE-787"
    ],
    "cna_assigner": "VulDB"
}
References

Affected packages

Git / github.com/libraw/libraw

Affected ranges

Type
GIT
Repo
https://github.com/libraw/libraw
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Fixed
Fixed
Database specific
Show details
{
    "cpe": "cpe:2.3:a:libraw:libraw:*:*:*:*:*:*:*:*",
    "source": [
        "CPE_RANGE",
        "REFERENCES"
    ],
    "extracted_events": [
        {
            "introduced": "0"
        },
        {
            "fixed": "0.22.1"
        }
    ]
}

Affected versions

0.*
0.11
0.12
0.12.0
0.13
0.13.0
0.13.1
0.13.2
0.13.3
0.13.4
0.13.5
0.13.6
0.14
0.14.0
0.14.1
0.14.2
0.14.3
0.14.4
0.14.5
0.14.6
0.15
0.15.0
0.16
0.16.0
0.17
0.17.0
0.18
0.18.0
0.19
0.20
0.20-RC2
0.20.0
0.20.1
0.20.2
0.21
0.21-Beta1
0.21.0
0.21.1
0.22.0

Database specific

vanir_signatures
[
    {
        "id": "CVE-2026-5318-98442b3f",
        "target": {
            "function": "HuffTable::initval",
            "file": "src/decompressors/losslessjpeg.cpp"
        },
        "deprecated": false,
        "digest": {
            "function_hash": "133194446028387202039164538590990797554",
            "length": 1269.0
        },
        "signature_version": "v1",
        "source": "https://github.com/libraw/libraw/commit/a6734e867b19d75367c05f872ac26322464e3995",
        "signature_type": "Function"
    },
    {
        "id": "CVE-2026-5318-c83540d1",
        "target": {
            "file": "src/decompressors/losslessjpeg.cpp"
        },
        "deprecated": false,
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "326761413661156394820900884209946624484",
                "9393470417408501326808684943003842057",
                "235583240642029526265400839232551055324",
                "255729870336141752472084508648059580457",
                "232132406769837678194374120828729585056",
                "275170039955600648939075200053395248899",
                "277991561106811252586383934784330613761",
                "328581871071293545468715766510115047561",
                "291257287519693227265917942841836945041",
                "298475588439797613578363806973380941942",
                "90510277236790103263695028072102205737"
            ]
        },
        "signature_version": "v1",
        "source": "https://github.com/libraw/libraw/commit/a6734e867b19d75367c05f872ac26322464e3995",
        "signature_type": "Line"
    }
]
source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-5318.json"
vanir_signatures_modified
"2026-08-12T16:41:07Z"