Security Resilience

CVE-2026-40386

Memory Safety in Libexif Project Libexif ≤ 0.6.25

Published
12 April 2026
Modified
14 April 2026
Patch / advisory
CVSS Score v3.1 4.0
Click a component to see what it means
Raw vectorCVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:L
EPSS Score 0.0013 2th percentile
Risk Priority 31 floored blend · peak EPSS

CVSS and EPSS are reproduced from their sources (NVD, FIRST EPSS). EPSS scores by FIRST (EPSS SIG), generated by Empirical Security. Risk Priority is our own derived reading, not an NVD score.

Summary

CVE-2026-40386 is a medium-severity Wrap or Wraparound (CWE-191) vulnerability in Libexif Project Libexif. Its CVSS base score is 4.0 (Medium).

Operationally, exploitation aligns with the MITRE ATT&CK technique Network Devices (T1584.008); ranked at the 2th percentile by exploit likelihood (below the median); it is not currently listed in the CISA KEV catalog.

The strongest mitigations our analysis identified map to SA-11 (Developer Testing and Evaluation) and SA-8 (Security and Privacy Engineering Principles) — 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.

CVE-2026-40386, published on 2026-04-12, is an integer underflow vulnerability (CWE-191) in the libexif library through version 0.6.25. The issue occurs in size checking during decoding of Fuji and Olympus MakerNote tags in EXIF data, with a CVSS v3.1 base score of 4.0 (AV:L/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:L). It affects the libexif library itself and any applications that use it to process image metadata.

A local attacker with no privileges can exploit this vulnerability through a high-complexity attack without user interaction. Successful exploitation could lead to either a low-impact denial of service, such as crashing libexif-using programs, or low-impact information disclosure by leaking data from the affected processes.

A patch addressing this issue is available in the libexif GitHub repository at https://github.com/libexif/libexif/commit/dc6eac6e9655d14d0779d99e82d0f5f442d2f34b. Security practitioners should ensure libexif-using applications are updated to incorporate this fix.

EU & UK References

Vulnerability Data

In libexif through 0.6.25, an integer underflow in size checking for Fuji and Olympus MakerNote decoding could be used by attackers to crash or leak information out of libexif-using programs.

CWE(s)

Related Threats

MITRE ATT&CK Enterprise Techniques

T1584.008 Network Devices Resource Development
Adversaries may compromise third-party network devices that can be used during targeting.
T1068 Exploitation for Privilege Escalation Privilege Escalation
Adversaries may exploit software vulnerabilities in an attempt to elevate privileges.
T1189 Drive-by Compromise Initial Access
Adversaries may gain access to a system through a user visiting a website over the normal course of browsing.
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.
Derived from this CVE’s CWE(s) via the direct CWE→ATT&CK cross-walk.

CVEs Like This One

CVE-2026-32775Same product: Libexif Project Libexif
CVE-2026-40385Same product: Libexif Project Libexif
CVE-2025-2258Shared CWE-191
CVE-2026-102192Shared CWE-191
CVE-2024-30008Shared CWE-191
CVE-2023-39413Shared CWE-191
CVE-2025-21156Shared CWE-191
CVE-2026-69687Shared CWE-191
CVE-2026-45884Shared CWE-191
CVE-2026-83869Shared CWE-191

Affected Assets

libexif project
libexif
≤ 0.6.25

Mitigating Controls

Mitigating Controls (NIST 800-53 r5) AI

Developer testing and static/dynamic analysis directly find integer underflow defects before code is released.

Security engineering principles require use of safe arithmetic constructs or language features that structurally eliminate integer underflow during subtraction.

Input validation can reject or sanitize values that would cause a subtraction to underflow the representable range.

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 full match
blocks

Secure SDLC practices directly prevent integer underflow defects via input validation, bounds checking, and static analysis.

ID.RA-01 partial match
blocks

Vulnerability scanning and code analysis can surface underflow flaws after they are introduced.

PR.PS-02 partial match
blocks

Routine patching can remediate known underflow bugs once they are discovered in deployed software.

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 catches integer underflow defects before release.

prevents

Secure coding standards directly prescribe safe integer handling and overflow/underflow prevention.

References