cve.bz

CVE-2026-5318 libraw libraw: Out-of-bounds Write

2.1 lowExploit referenceEPSS 0.7%Fix available

Low (2.1) in libraw libraw. EPSS 0.7% estimated probability of exploitation activity in the next 30 days.

On this page
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.

Severity

CVSS 4.0

2.1 low
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 3.1

4.3 medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:L
EPSS
0.7% (unchanged from 0.6% a week ago; 0.8% 30 days ago) estimated probability of exploitation activity in the next 30 days; 52nd percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: PoC · Automatable: no · Technical impact: partial, assessed 2026-04-03. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWEs
CWE-119 Improper Restriction of Operations within the Bounds of a Memory Buffer
CWE-787 Out-of-bounds Write
Published
Modified
NVD analysis
Analyzed
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2026-5318 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2026-5318?via=ask-ai-copy and https://cve.bz/cve/CVE-2026-5318?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2026-5318 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
libraw:librawbefore 0.22.1

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian14libraw0.22.1-1DEBIAN-CVE-2026-5318
Ubuntu16.04:LTS, 18.04:LTSkodi, dcraw, ufraw and 3 moreno fix listedUBUNTU-CVE-2026-5318
Ubuntu20.04:LTS, 22.04:LTSkodi, dcraw, darktable and 2 moreno fix listedUBUNTU-CVE-2026-5318
Ubuntu24.04:LTS, 25.10, 26.04:LTS and 1 morekodi, dcraw, digikam and 3 moreno fix listedUBUNTU-CVE-2026-5318
UbuntuPro:16.04:LTS, Pro:18.04:LTS, Pro:20.04:LTS and 1 moredigikamno fix listedUBUNTU-CVE-2026-5318

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu.

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

This Moderate impact flaw in LibRaw's JPEG DHT Parser could lead to a Denial of Service. A remote attacker could trigger an out-of-bounds write by providing a specially crafted JPEG image to an application utilizing LibRaw. This vulnerability affects Red Hat Enterprise Linux versions that include LibRaw.

Red Hat's mitigation

Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base, or stability.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 6libraw1394Out of support scope
Red Hat Enterprise Linux 7LibRawFix deferred
Red Hat Enterprise Linux 7libraw1394Fix deferred
Red Hat Enterprise Linux 8LibRawFix deferred
Red Hat Enterprise Linux 8libraw1394Fix deferred
Red Hat Enterprise Linux 9LibRawFix deferred

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2026-5318.

Attack patterns (CAPEC)

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits. More on the page of CWE-119 (12).

References

Check your stackJSON