CVE-2026-5318 Details
Description
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.
A heap out-of-bounds write vulnerability has been identified in LibRaw versions prior to 0.22.0. The issue arises in the HuffTable::initval function within the JPEG DHT Parser component, specifically in the file src/decompressors/losslessjpeg.cpp. The vulnerability is triggered by manipulating the bits[] argument, which leads to an out-of-bounds write. This flaw can be exploited remotely, and a public exploit is available.
Users are advised to upgrade LibRaw to version 0.22.1, which addresses this vulnerability. The patch can be applied by downloading the latest version from the LibRaw GitHub repository.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Apr 3, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/biniamf/pocs/tree/main/libraw_lljpeg | [email protected] | ExploitThird Party Advisory |
| https://github.com/LibRaw/LibRaw/ | [email protected] | Product |
| https://github.com/LibRaw/LibRaw/commit/a6734e867b19d75367c05f872ac26322464e3995 | [email protected] | Patch |
| https://github.com/LibRaw/LibRaw/issues/794 | [email protected] | Issue Tracking |
| https://github.com/LibRaw/LibRaw/issues/794#issuecomment-4065342499 | [email protected] | Issue Tracking |
| https://github.com/LibRaw/LibRaw/releases/tag/0.22.1 | [email protected] | ProductRelease Notes |
| https://vuldb.com/submit/780538 | [email protected] | ExploitThird Party AdvisoryVDB Entry |
| https://vuldb.com/vuln/354650 | [email protected] | Third Party AdvisoryVDB Entry |
| https://vuldb.com/vuln/354650/cti | [email protected] | Permissions RequiredVDB Entry |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-119 | Improper Restriction of Operations within the Bounds of a Memory Buffer | [email protected] |
| CWE-787 | Out-of-bounds Write | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| libraw libraw | < 0.22.1 |
CPE
Remediation
| |
Change History
6 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Apr 29, 2026 | Initial Analysis | [email protected] |
| Apr 29, 2026 | Data Remediation | [email protected] |
| Apr 7, 2026 | CVE Modified | [email protected] |
| Apr 2, 2026 | New CVE Received | [email protected] |