CVE-2026-24450
Heap Buffer Overflow in LibRaw uncompressed_fp_dng_load_raw Function
Publication date: 2026-04-07
Last updated on: 2026-04-10
Assigner: Talos
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| libraw | libraw | 0.22.1 |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-190 | The product performs a calculation that can produce an integer overflow or wraparound when the logic assumes that the resulting value will always be larger than the original value. This occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may become a very small or negative number. |
Attack-Flow Graph
AI Powered Q&A
How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:
The provided information does not specify any direct impact of this vulnerability on compliance with common standards and regulations such as GDPR or HIPAA.
What immediate steps should I take to mitigate this vulnerability?
The primary mitigation step is to update LibRaw to the patched version released on 2026-04-06 that fixes this integer overflow vulnerability.
If updating immediately is not possible, ensure that the max_raw_memory_mb setting is not increased above approximately 16 GB (16,384 MB), as the default 2 GB limit prevents exploitation by rejecting large allocations.
Avoid processing untrusted or suspicious DNG files from unverified sources until the patch is applied.
Implement monitoring for application crashes or heap corruption symptoms related to LibRaw usage.
Can you explain this vulnerability to me?
CVE-2026-24450 is an integer overflow vulnerability in the LibRaw library's function uncompressed_fp_dng_load_raw(), which processes uncompressed floating-point DNG image files.
The vulnerability occurs because the code uses 64-bit arithmetic to calculate the required buffer size for image data but then uses 32-bit arithmetic for the actual memory allocation. This mismatch causes an integer overflow when the calculated size exceeds the maximum 32-bit value, resulting in a much smaller buffer being allocated than needed.
An attacker can craft a malicious DNG file with specially manipulated TIFF tags controlling tile dimensions and samples per pixel to trigger this overflow. When the program writes image data into this undersized buffer, it causes a heap buffer overflow.
This vulnerability can lead to heap corruption and potentially allow an attacker to execute arbitrary code remotely when processing malicious files.
How can this vulnerability impact me? :
This vulnerability can have serious impacts including heap buffer overflow leading to heap corruption.
An attacker can exploit this by providing a maliciously crafted DNG file that triggers the overflow, potentially resulting in arbitrary code execution on the affected system.
Because the vulnerability can be triggered remotely by processing a malicious file, it poses a significant security risk, especially in applications that handle untrusted image files and have increased the max_raw_memory_mb limit above approximately 16 GB.
How can this vulnerability be detected on my network or system? Can you suggest some commands?
This vulnerability occurs when processing specially crafted malicious DNG files with the vulnerable LibRaw library. Detection involves monitoring for crashes or heap buffer overflow errors in applications using LibRaw, especially those processing uncompressed floating-point DNG images.
One practical detection method is to use AddressSanitizer or similar memory error detection tools to identify heap-buffer-overflow errors in the uncompressed_fp_dng_load_raw() function during file processing.
Since the vulnerability is triggered by malicious DNG files, scanning for suspicious or unusually large DNG files with abnormal TIFF tag values (such as very large tileWidth, tileHeight, or tileCnt) could help identify potential exploit attempts.
Suggested commands include running the vulnerable application or a test harness with AddressSanitizer enabled to catch heap buffer overflows, for example:
- Compile the application with AddressSanitizer: `gcc -fsanitize=address -g -o app app.c -lraw`
- Run the application with a suspicious DNG file: `./app suspicious_file.dng`
Additionally, monitoring logs for crashes or abnormal termination when processing DNG files can indicate exploitation attempts.