Cyber Resilience

CVE-2026-21413

Memory Safety in Libraw 0.22.0 … 0.22.1

Public PoCMemory Safety
Published
07 April 2026
Modified
15 July 2026
CVSS Score v3.1 9.8
Click a component to see what it means
Raw vectorCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS Score 0.0075 52th percentile
Risk Priority 72 floored blend · peak EPSS

Summary

CVE-2026-21413 is a critical-severity Improper Validation of Array Index (CWE-129) vulnerability in Libraw Libraw. Its CVSS base score is 9.8 (Critical).

Operationally, exploitation aligns with the MITRE ATT&CK technique Exploitation for Privilege Escalation (T1068); ranked in the top 48% of CVEs by exploit likelihood; it is not currently listed in the CISA KEV catalog; a public proof-of-concept is referenced.

The strongest mitigations our analysis identified map to SA-11 (Developer Testing and Evaluation) and SA-15 (Development Process, Standards, and Tools) — see the control section below for these in your framework.

Deeper analysis AI-assisted summary

Synthesised by an AI model from the NVD description and linked references — a reading aid, not an authoritative source.

A heap-based buffer overflow vulnerability, designated CVE-2026-21413, affects the lossless_jpeg_load_raw functionality in LibRaw at Commit 0b56545 and Commit d20315b. This flaw arises from improper validation of array indices (CWE-129), allowing a specially crafted malicious file to trigger a heap buffer overflow when processed by the library. LibRaw is a widely used open-source library for reading RAW image files, commonly integrated into image processing applications, photo editors, and camera software.

The vulnerability carries a CVSS v3.1 base score of 9.8 (AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H), indicating it is exploitable remotely with low complexity, no privileges or user interaction required. An attacker can supply a malicious file to any application or system that uses the affected LibRaw commits for RAW image decoding, potentially leading to arbitrary code execution, data corruption, or denial of service through heap memory corruption.

Mitigation details are provided in the Talos Intelligence advisory TALOS-2026-2331, accessible at https://talosintelligence.com/vulnerability_reports/TALOS-2026-2331 and https://www.talosintelligence.com/vulnerability_reports/TALOS-2026-2331. Security practitioners should consult these reports for patching guidance, updated commits, or workarounds specific to LibRaw integrations.

OWASP Top 10 for Web (2025)

EU & UK References

Vulnerability Data

A heap-based buffer overflow vulnerability exists in the lossless_jpeg_load_raw functionality of LibRaw Commit 0b56545 and Commit d20315b. A specially crafted malicious file can lead to a heap buffer overflow. An attacker can provide a malicious file to trigger this vulnerability.

CWE(s)

Related Threats

MITRE ATT&CK Enterprise Techniques

T1068 Exploitation for Privilege Escalation Privilege Escalation
Adversaries may exploit software vulnerabilities in an attempt to elevate privileges.
T1190 Exploit Public-Facing Application Initial Access
Adversaries may attempt to exploit a weakness in an Internet-facing host or system to initially access a network.
T1203 Exploitation for Client Execution Execution
Adversaries may exploit software vulnerabilities in client applications to execute code.
T1210 Exploitation of Remote Services Lateral Movement
Adversaries may exploit remote services to gain unauthorized access to internal systems once inside of a network.
T1211 Exploitation for Stealth Stealth
Adversaries may exploit vulnerabilities to evade detection by hiding activity, suppressing logging, or operating within trusted or unmonitored components.
T1212 Exploitation for Credential Access Credential Access
Adversaries may exploit software vulnerabilities in an attempt to collect credentials.
Derived from this CVE’s CWE(s) via the direct CWE→ATT&CK cross-walk.

CVEs Like This One

CVE-2023-1729Same product: Libraw Libraw
CVE-2023-21650Shared CWE-129, CWE-787
CVE-2023-28558Shared CWE-129, CWE-787
CVE-2023-28565Shared CWE-129, CWE-787
CVE-2023-35126Shared CWE-129, CWE-787
CVE-2023-28567Shared CWE-129, CWE-787
CVE-2024-22181Shared CWE-129, CWE-787
CVE-2023-28573Shared CWE-129, CWE-787
CVE-2020-0986Shared CWE-787
CVE-2023-44807Shared CWE-787

Affected Assets

libraw
libraw
0.22.0, 0.22.1

Mitigating Controls

Mitigating Controls (NIST 800-53 r5) AI

Developer testing and evaluation (including fuzzing and bounds checks) finds out-of-bounds write flaws before deployment.

Requiring documented secure-development standards and tools can mandate bounds-checked coding practices that avoid the weakness.

Input validation can structurally reject or sanitize data that would otherwise trigger an out-of-bounds write.

Memory-protection mechanisms limit the exploitability and blast radius of a successful out-of-bounds write.

Mitigating Controls (NIST CSF 2.0) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→CSF cross-walk (authority under review) — links open the control.

PR.PS-06 mostly match
prevents

Secure SDLC practices directly require input validation and bounds checking that prevent improper array indexing.

ID.RA-01 partial match
prevents

Vulnerability scanning and recording can discover out-of-bounds write flaws so they can be remediated.

PR.PS-02 partial match
prevents

Patching or replacing vulnerable software directly eliminates known instances of this coding weakness.

Mitigating Controls (ISO/IEC 27001:2022 Annex A) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→ISO cross-walk (authority under review) — links open the control.

finds

Security testing in development can detect out-of-bounds array access but does not prevent the weakness by itself.

prevents

Secure development lifecycle mandates input validation and bounds checking that directly prevents improper array indexing.

prevents

Application security requirements include validation of untrusted input used for indexing or addressing memory structures.

prevents

Secure architecture principles encourage defensive coding patterns that reduce index-related vulnerabilities.

prevents

Secure coding standards explicitly require bounds checking and validation of array indices derived from untrusted data.

prevents

Change management can enforce review gates that catch unsafe memory operations before deployment.

References