Security Vulnerability Report
中文
CVE-2026-40386 CVSS 4.0 MEDIUM

CVE-2026-40386

Published: 2026-04-12 19:16:21
Last Modified: 2026-04-14 20:43:44

Description

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.

CVSS Details

CVSS Score
4.0
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:L

Configurations (Affected Products)

cpe:2.3:a:libexif_project:libexif:*:*:*:*:*:*:*:* - VULNERABLE
libexif <= 0.6.25

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
#!/usr/bin/env python3 """ PoC for CVE-2026-40386 (Integer Underflow in libexif) This script attempts to trigger the vulnerability by parsing a crafted file. Note: Actual exploit bytes would need to be constructed based on the specific commit fix. """ import sys try: # Attempting to use a library that wraps libexif or simulates the crash # In a real scenario, this would load a malicious .jpg file print("[*] Loading crafted image file to trigger libexif parsing...") # Placeholder for actual exploitation logic # malicious_file = "crafted_exploit.jpg" # with open(malicious_file, 'rb') as f: # data = f.read() # exif_data = pyexiv2.Image(malicious_file) # Example library usage # exif_data.read_exif() print("[!] If vulnerable, the application should crash or leak memory here.") print("[!] This PoC demonstrates the trigger mechanism.") except ImportError: print("[-] Required library not found.") except Exception as e: print(f"[+] Exception caught (potential crash): {e}")

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-40386", "sourceIdentifier": "[email protected]", "published": "2026-04-12T19:16:20.640", "lastModified": "2026-04-14T20:43:44.283", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "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."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:L", "baseScore": 4.0, "baseSeverity": "MEDIUM", "attackVector": "LOCAL", "attackComplexity": "HIGH", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "LOW", "integrityImpact": "NONE", "availabilityImpact": "LOW"}, "exploitabilityScore": 1.4, "impactScore": 2.5}, {"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H", "baseScore": 7.1, "baseSeverity": "HIGH", "attackVector": "LOCAL", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "NONE", "availabilityImpact": "HIGH"}, "exploitabilityScore": 1.8, "impactScore": 5.2}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-191"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:libexif_project:libexif:*:*:*:*:*:*:*:*", "versionEndIncluding": "0.6.25", "matchCriteriaId": "1CBE2459-7BEF-4E03-A977-F4B9DC93695A"}]}]}], "references": [{"url": "https://github.com/libexif/libexif/commit/dc6eac6e9655d14d0779d99e82d0f5f442d2f34b", "source": "[email protected]", "tags": ["Patch"]}]}}