LibRaw up to 0.22.0 JPEG DHT Parser losslessjpeg.cpp HuffTable::initval bits[] out-of-bounds write

CVSS Meta Temp Score
CVSS is a standardized scoring system to determine possibilities of attacks. The Temp Score considers temporal factors like disclosure, exploit and countermeasures. The unique Meta Score calculates the average score of different sources to provide a normalized scoring system.
Current Exploit Price (≈)
Our analysts are monitoring exploit markets and are in contact with vulnerability brokers. The range indicates the observed or calculated exploit price to be seen on exploit markets. A good indicator to understand the monetary effort required for and the popularity of an attack.
CTI Interest Score
Our Cyber Threat Intelligence team is monitoring different web sites, mailing lists, exploit markets and social media networks. The CTI Interest Score identifies the interest of attackers and the security community for this specific vulnerability in real-time. A high score indicates an elevated risk to be targeted for this vulnerability.
3.9$0-$5k2.00

Summaryinfo

A vulnerability, which was classified as critical, was found in LibRaw up to 0.22.0. Affected is the function HuffTable::initval of the file src/decompressors/losslessjpeg.cpp of the component JPEG DHT Parser. Such manipulation of the argument bits[] leads to out-of-bounds write. This vulnerability is referenced as CVE-2026-5318. It is possible to launch the attack remotely. Furthermore, an exploit is available. You should upgrade the affected component.

Detailsinfo

A vulnerability was found in LibRaw up to 0.22.0 and classified as problematic. Affected by this issue is the function HuffTable::initval of the file src/decompressors/losslessjpeg.cpp of the component JPEG DHT Parser. The manipulation of the argument bits[] with an unknown input leads to a out-of-bounds write vulnerability. Using CWE to declare the problem leads to CWE-787. The product writes data past the end, or before the beginning, of the intended buffer. Impacted is availability.

The advisory is available at github.com. This vulnerability is handled as CVE-2026-5318. The exploitation is known to be easy. The attack may be launched remotely. No form of authentication is required for exploitation. Successful exploitation requires user interaction by the victim. Technical details as well as a public exploit are known.

The exploit is available at github.com. It is declared as proof-of-concept.

Upgrading to version 0.22.1 eliminates this vulnerability. Applying the patch a6734e867b19d75367c05f872ac26322464e3995 is able to eliminate this problem. The bugfix is ready for download at github.com. The best possible mitigation is suggested to be upgrading to the latest version.

The vulnerability is also documented in the databases at CNNVD (CNNVD-202604-466) and EUVD (EUVD-2026-18116). If you want to get best quality of vulnerability data, you may have to visit VulDB.

Productinfo

Type

Name

Version

License

Website

CPE 2.3info

CPE 2.2info

CVSSv4info

VulDB Vector: 🔒
VulDB Reliability: 🔍

CVSSv3info

VulDB Meta Base Score: 4.3
VulDB Meta Temp Score: 3.9

VulDB Base Score: 4.3
VulDB Temp Score: 3.9
VulDB Vector: 🔒
VulDB Reliability: 🔍

CVSSv2info

AVACAuCIA
💳💳💳💳💳💳
💳💳💳💳💳💳
💳💳💳💳💳💳
VectorComplexityAuthenticationConfidentialityIntegrityAvailability
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock

VulDB Base Score: 🔒
VulDB Temp Score: 🔒
VulDB Reliability: 🔍

Exploitinginfo

Class: Out-of-bounds write
CWE: CWE-787 / CWE-119
CAPEC: 🔒
ATT&CK: 🔒

Physical: No
Local: No
Remote: Yes

Availability: 🔒
Access: Public
Status: Proof-of-Concept
Download: 🔒

EPSS Score: 🔒
EPSS Percentile: 🔒

Price Prediction: 🔍
Current Price Estimation: 🔒

0-DayUnlockUnlockUnlockUnlock
TodayUnlockUnlockUnlockUnlock

Threat Intelligenceinfo

Interest: 🔍
Active Actors: 🔍
Active APT Groups: 🔍

Countermeasuresinfo

Recommended: Upgrade
Status: 🔍

0-Day Time: 🔒

Upgrade: LibRaw 0.22.1
Patch: a6734e867b19d75367c05f872ac26322464e3995

Timelineinfo

04/01/2026 Advisory disclosed
04/01/2026 +0 days VulDB entry created
04/03/2026 +2 days VulDB entry last update

Sourcesinfo

Product: github.com

Advisory: 794
Status: Confirmed
Confirmation: 🔒

CVE: CVE-2026-5318 (🔒)
GCVE (CVE): GCVE-0-2026-5318
GCVE (VulDB): GCVE-100-354650
EUVD: 🔒
CNNVD: CNNVD-202604-466 - Libraw 缓冲区错误漏洞

scip Labs: https://www.scip.ch/en/?labs.20161013

Entryinfo

Created: 04/01/2026 14:48
Updated: 04/03/2026 22:54
Changes: 04/01/2026 14:48 (63), 04/01/2026 16:18 (1), 04/02/2026 09:42 (1), 04/03/2026 22:54 (6)
Complete: 🔍
Submitter: biniam
Cache ID: 216:069:103

Submitinfo

Accepted

If you want to get best quality of vulnerability data, you may have to visit VulDB.

Discussion

No comments yet. Languages: en.

Please log in to comment.

Are you interested in using VulDB?

Download the whitepaper to learn more about our service!