LibRaw JPEG DHT losslessjpeg.cpp initval out-of-bounds write
Summary
| CVE | CVE-2026-5318 |
|---|---|
| State | PUBLISHED |
| Assigner | VulDB |
| Source Priority | CVE Program / NVD first with legacy fallback |
| Published | 2026-04-02 03:16:07 UTC |
| Updated | 2026-04-02 03:16:07 UTC |
| 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. |
Risk And Classification
Primary CVSS: v4.0 5.3 MEDIUM from [email protected]
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/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Problem Types: CWE-119 | CWE-787 | CWE-787 Out-of-bounds Write | CWE-119 Memory Corruption
| Version | Source | Type | Score | Severity | Vector |
|---|---|---|---|---|---|
| 4.0 | [email protected] | Secondary | 5.3 | MEDIUM | 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/C... |
| 4.0 | CNA | DECLARED | 5.3 | MEDIUM | 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 |
| 3.1 | [email protected] | Primary | 4.3 | MEDIUM | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:L |
| 3.1 | CNA | DECLARED | 4.3 | MEDIUM | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:L/E:P/RL:O/RC:C |
| 3.0 | CNA | DECLARED | 4.3 | MEDIUM | CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:L/E:P/RL:O/RC:C |
| 2.0 | [email protected] | Secondary | 5 | AV:N/AC:L/Au:N/C:N/I:N/A:P | |
| 2.0 | CNA | DECLARED | 5 | AV:N/AC:L/Au:N/C:N/I:N/A:P/E:POC/RL:OF/RC:C |
CVSS v4.0 Breakdown
Attack Vector
NetworkAttack Complexity
LowAttack Requirements
NonePrivileges Required
NoneUser Interaction
PassiveConfidentiality
NoneIntegrity
NoneAvailability
LowSub Conf.
NoneSub Integrity
NoneSub Availability
NoneCVSS: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/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
CVSS v3.1 Breakdown
Attack Vector
NetworkAttack Complexity
LowPrivileges Required
NoneUser Interaction
RequiredScope
UnchangedConfidentiality
NoneIntegrity
NoneAvailability
LowCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:L
CVSS v3.0 Breakdown
Attack Vector
NetworkAttack Complexity
LowPrivileges Required
NoneUser Interaction
RequiredScope
UnchangedConfidentiality
NoneIntegrity
NoneAvailability
LowCVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:L/E:P/RL:O/RC:C
Vendor Declared Affected Products
| Source | Vendor | Product | Version | Platforms |
|---|---|---|---|---|
| CNA | Na | LibRaw | affected 0.1 | Not specified |
| CNA | Na | LibRaw | affected 0.2 | Not specified |
| CNA | Na | LibRaw | affected 0.3 | Not specified |
| CNA | Na | LibRaw | affected 0.4 | Not specified |
| CNA | Na | LibRaw | affected 0.5 | Not specified |
| CNA | Na | LibRaw | affected 0.6 | Not specified |
| CNA | Na | LibRaw | affected 0.7 | Not specified |
| CNA | Na | LibRaw | affected 0.8 | Not specified |
| CNA | Na | LibRaw | affected 0.9 | Not specified |
| CNA | Na | LibRaw | affected 0.10 | Not specified |
| CNA | Na | LibRaw | affected 0.11 | Not specified |
| CNA | Na | LibRaw | affected 0.12 | Not specified |
| CNA | Na | LibRaw | affected 0.13 | Not specified |
| CNA | Na | LibRaw | affected 0.14 | Not specified |
| CNA | Na | LibRaw | affected 0.15 | Not specified |
| CNA | Na | LibRaw | affected 0.16 | Not specified |
| CNA | Na | LibRaw | affected 0.17 | Not specified |
| CNA | Na | LibRaw | affected 0.18 | Not specified |
| CNA | Na | LibRaw | affected 0.19 | Not specified |
| CNA | Na | LibRaw | affected 0.20 | Not specified |
| CNA | Na | LibRaw | affected 0.21 | Not specified |
| CNA | Na | LibRaw | affected 0.22.0 | Not specified |
| CNA | Na | LibRaw | unaffected 0.22.1 | Not specified |
References
| Reference | Source | Link | Tags |
|---|---|---|---|
| github.com/LibRaw/LibRaw/issues/794 | [email protected] | github.com | |
| vuldb.com/vuln/354650 | [email protected] | vuldb.com | |
| github.com/LibRaw/LibRaw | [email protected] | github.com | |
| github.com/LibRaw/LibRaw/commit/a6734e867b19d75367c05f872ac26322464e3995 | [email protected] | github.com | |
| github.com/LibRaw/LibRaw/issues/794 | [email protected] | github.com | |
| vuldb.com/submit/780538 | [email protected] | vuldb.com | |
| vuldb.com/vuln/354650/cti | [email protected] | vuldb.com | |
| github.com/biniamf/pocs/tree/main/libraw_lljpeg | [email protected] | github.com | |
| CVE Program record | CVE.ORG | www.cve.org | canonical |
| NVD vulnerability detail | NVD | nvd.nist.gov | canonical, analysis |
Vendor Comments And Credit
Discovery Credit
CNA: biniam (VulDB User) (en)
Additional Advisory Data
| Source | Time | Event |
|---|---|---|
| CNA | 2026-04-01T00:00:00.000Z | Advisory disclosed |
| CNA | 2026-04-01T02:00:00.000Z | VulDB entry created |
| CNA | 2026-04-01T16:18:30.000Z | VulDB entry last update |
There are currently no legacy QID mappings associated with this CVE.