CVE-2026-40386
NixOS vulnerability analysis and mitigation

Overview

CVE-2026-40386 is an integer underflow vulnerability in libexif through version 0.6.25 affecting the MakerNote decoding logic for Fuji and Olympus camera metadata. The flaw was disclosed on April 12, 2026, and a patch was committed to the libexif GitHub repository on April 14, 2026. It carries a CVSS v3.1 base score of 7.1 (High) per NVD scoring, with impacts to both confidentiality and availability (GitHub Advisory, libexif Commit).

Technical details

The root cause is an integer underflow (CWE-191) in the size-checking logic within exif-mnote-data-fuji.c and exif-mnote-data-olympus.c. Specifically, the bounds check if (i > n->count - 1) is vulnerable when n->count is zero: subtracting 1 from an unsigned integer wraps around to a very large value, causing the check to pass incorrectly and allowing out-of-bounds memory access. The fix replaces this with if (i >= n->count), which correctly handles the zero-count case. Exploitation requires supplying a crafted image file with malicious Fuji or Olympus MakerNote EXIF data to a program using libexif (libexif Commit, GitHub Advisory).

Impact

Successful exploitation can result in denial of service (application crash) or information disclosure (memory leakage) from any application that uses libexif to parse image metadata. The vulnerability affects confidentiality and availability but not integrity. Applications processing user-supplied images — such as photo management tools, web services, or media libraries — are at risk if they depend on a vulnerable version of libexif (GitHub Advisory, Feedly).

Exploitability

There is no public proof-of-concept exploit and no evidence of in-the-wild exploitation as of the time of reporting. The EPSS score is approximately 0.013%, indicating a very low probability of exploitation in the near term. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. Exploitation requires local access and the ability to supply a crafted image file to a vulnerable application (GitHub Advisory).

Exploitation steps

  1. Craft a malicious image file: Create a JPEG or TIFF file with a specially crafted Fuji or Olympus MakerNote EXIF segment where the MakerNote entry count is set to zero.
  2. Trigger the vulnerable code path: Supply the crafted image to a target application that uses libexif ≤ 0.6.25 for EXIF parsing (e.g., a photo viewer, image upload service, or media indexer).
  3. Trigger the integer underflow: When exif_mnote_data_fuji_get_value or exif_mnote_data_olympus_get_value is called with index i = 0 and n->count = 0, the check i > n->count - 1 evaluates as 0 > UINT_MAX, which is false, bypassing the bounds check.
  4. Achieve crash or memory leak: The out-of-bounds memory access either causes the application to crash (denial of service) or reads adjacent memory contents, potentially leaking sensitive data from the process (libexif Commit, GitHub Advisory).

Indicators of compromise

  • File System: Presence of crafted JPEG/TIFF files with anomalous or zero-count Fuji/Olympus MakerNote EXIF segments in directories processed by libexif-dependent applications.
  • Logs: Application crash logs or core dumps originating from processes invoking exif_mnote_data_fuji_get_value or exif_mnote_data_olympus_get_value; segmentation fault signals from image processing services.
  • Process: Unexpected termination (SIGSEGV or SIGABRT) of image processing applications after handling user-supplied image files; abnormal memory read patterns in applications using libexif.

Mitigation and workarounds

Upgrade libexif to a version beyond 0.6.25 that includes the fix from commit dc6eac6e9655d14d0779d99e82d0f5f442d2f34b. Major Linux distributions including Red Hat (RHSA-2026:20929, RHSA-2026:22553, RHSA-2026:22529), Debian (DLA-4558-1), Fedora (Fedora 42, 43, 44), AlmaLinux, Rocky Linux, openSUSE, Slackware, and Mageia have all issued updated packages. As a workaround where patching is not immediately possible, restrict processing of image files to trusted sources and avoid exposing libexif-dependent services to untrusted user-supplied images (GitHub Advisory, Red Hat Advisory, Debian LTS).

Community reactions

The vulnerability received broad attention from Linux distribution maintainers, with rapid patch releases across Red Hat, Debian, Fedora, AlmaLinux, Rocky Linux, openSUSE, Slackware, and Mageia within weeks of disclosure. Microsoft also acknowledged the vulnerability's impact on Azure Linux (AZL3) and CBL-Mariner 2 packages. The NixOS community tracked the issue via a GitHub issue, and security news aggregators such as LinuxSecurity.com and LinuxCompatible.org covered the distribution-level updates (Red Hat Advisory, Debian LTS, Microsoft MSRC).

Additional resources


SourceThis report was generated using AI

Related NixOS vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-13097CRITICAL9.1
  • NixOS logoNixOS
  • python3-samba-test
NoYesAug 20, 2026
CVE-2026-11861HIGH8.1
  • NixOS logoNixOS
  • samba-common
NoYesAug 20, 2026
CVE-2026-73198HIGH7.5
  • NixOS logoNixOS
  • ctdb-ceph-mutex
NoYesAug 20, 2026
CVE-2026-73197HIGH7.5
  • NixOS logoNixOS
  • samba-test-libs-debuginfo
NoYesAug 20, 2026
CVE-2026-73196MEDIUM6.5
  • NixOS logoNixOS
  • samba-ldb-ldap-modules-debuginfo
NoYesAug 20, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management