CVE-2026-5318: A weakness has been identified in LibRaw up to 0.22.0
CVE-2026-5318 is a medium-severity flaw (CVSS 4.3) affecting libraw. Below: why it ranks where it does, which versions are affected, what to do, and the exact commands.
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: a6734e867b
Why this priority
- Public exploit reference
A fixed release or distro patch exists.
Last updated 2026-06-17 · Sources: CVE Program, NVD, CISA KEV, EPSS and vendor advisories · How we score
Am I affected?
Timeline
- Published CVE record published
- Updated Record last modified
Scores and fixes here are computed automatically from those and other public sources. Confirm with the vendor advisory before changing production systems.
Quick answers
How do I fix CVE-2026-5318?
libraw: upgrade to 0.22.1. Exact commands for each OS are on this page.
Is CVE-2026-5318 being exploited?
CVE-2026-5318 is not on the CISA Known Exploited Vulnerabilities list at the time of the last update. Check again, as this can change.
What does CVE-2026-5318 affect?
CVE-2026-5318 affects libraw. Severity is medium (CVSS 4.3). 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-boun
How urgent is CVE-2026-5318?
Priority 33/100. Public exploit reference
Related CVEs
- CVE-2026-21413 CRITICAL 9.8 DOWNGRADE A heap-based buffer overflow vulnerability exists in the lossless_jpeg_load_raw functionality of LibRaw Commit
- CVE-2026-5342 MEDIUM 5.3 UPGRADE A flaw has been found in LibRaw up to 0.22.0
- CVE-2026-24660 HIGH 8.1 DOWNGRADE A heap-based buffer overflow vulnerability exists in the x3f_load_huffman functionality of LibRaw Commit d2031
- CVE-2026-20911 CRITICAL 9.8 DOWNGRADE A heap-based buffer overflow vulnerability exists in the HuffTable::initval functionality of LibRaw Commit 0b5
- CVE-2026-20889 CRITICAL 9.8 DOWNGRADE A heap-based buffer overflow vulnerability exists in the x3f_thumb_loader functionality of LibRaw Commit d2031