CVE-2026-21413
Memory Safety in Libraw 0.22.0 … 0.22.1
Raw vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:HCVSS and EPSS are reproduced from their sources (NVD, FIRST EPSS). EPSS, Forum of Incident Response and Security Teams (FIRST), epss.first.org. Risk Priority is our own derived reading, not an NVD score.
Summary
CVE-2026-21413 is a critical-severity Improper Validation of Array Index (CWE-129) vulnerability in 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 37% 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
- 🇪🇺 ENISA EUVD: EUVD-2026-19624
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
MITRE ATT&CK v20.0
CVEs Like This One
Affected Assets
Mitigating Controls
Mitigating Controls (NIST 800-53 r5)
Our mappings, made for this CVE.
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)
Our mappings, derived directly from the weakness types (CWEs) cited in the NVD entry via our CWE→CSF cross-walk — links open the control.
Secure SDLC practices directly require input validation and bounds checking that prevent improper array indexing.
Vulnerability scanning and recording can discover out-of-bounds write flaws so they can be remediated.
Patching or replacing vulnerable software directly eliminates known instances of this coding weakness.
Mitigating Controls (ISO/IEC 27001:2022 Annex A)
Our mappings, derived directly from the weakness types (CWEs) cited in the NVD entry via our CWE→ISO cross-walk — links open the control.
Security testing in development can detect out-of-bounds array access but does not prevent the weakness by itself.
A.5.21's reach is on supplier relationships and third-party attestations; the penetration testing it names validates supplier security posture and compliance with stated requirements, not discovery of implementation defects in delivered code, and CWE-129 is a first-party implementation flaw the clause does not reach.
Training developers on secure coding practices (input validation, bounds checking) reduces instances of improper array index validation, but is fallible — developers can still write code with missing or incorrect bounds checks even after training, leaving a substantial remainder.
Secure coding standards explicitly require bounds checking and validation of array indices derived from untrusted data.
A.8.30 carries its effect through the secure-development practices (8.25–8.29) its contract requires of the supplier, so it reduces ordinary implementation-phase software weaknesses like CWE-129 in delivered code the way those practices do, at the clause's declared ceiling of `partial`.
A.8.7 detects and repairs malware, but an out-of-bounds write is a code defect that malware may exploit, not the malware itself; the control does not stop the underlying memory corruption from being triggered.