Security Vulnerability Report
中文
CVE-2026-32739 CVSS 6.5 MEDIUM

CVE-2026-32739

Published: 2026-05-19 20:16:19
Last Modified: 2026-05-20 14:17:14

Description

libheif is a HEIF and AVIF file format decoder and encoder. In versions 1.21.2 and below, a crafted 800-byte HEIF sequence file causes an infinite loop in Box_stts::get_sample_duration(), consuming 100% CPU indefinitely with zero progress, leading to DoS. The loop has no iteration limit or timeout and is triggered during file open (parsing) - before any user interaction or image decoding. The process stays alive (no crash, no error logged), making it invisible to crash-based monitoring. This issue has been fixed in version 1.22.0.

CVSS Details

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

Configurations (Affected Products)

cpe:2.3:a:struktur:libheif:*:*:*:*:*:*:*:* - VULNERABLE
libheif <= 1.21.2

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import sys # PoC Concept for CVE-2026-32739 # This script demonstrates how a vulnerable application might trigger the bug # when attempting to parse a crafted HEIF file. # Note: Creating the specific 800-byte HEIF payload requires deep knowledge # of the ISO Base Media File Format. Below is a simulation of how the # vulnerable function would be called. def trigger_vulnerability(file_path): try: # In a real scenario, this would call a library like pillow-heif or raw libheif # which internally calls Box_stts::get_sample_duration() print(f"[*] Attempting to parse file: {file_path}") # Simulate the parsing logic that leads to the infinite loop # This represents the vulnerable code path in libheif <= 1.21.2 print("[!] Vulnerable function Box_stts::get_sample_duration() called...") print("[!] CPU usage spikes to 100%. Infinite loop reached.") # Real execution would hang here. while True: pass except KeyboardInterrupt: print("\n[-] Process interrupted by user.") if __name__ == "__main__": # In a real exploit, 'malicious.heif' would be the crafted 800-byte file print("[+] CVE-2026-32739 PoC Trigger") print("[+] This simulates the effect of opening the malicious file.") # trigger_vulnerability("malicious.heif")

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-32739", "sourceIdentifier": "[email protected]", "published": "2026-05-19T20:16:18.780", "lastModified": "2026-05-20T14:17:13.740", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "libheif is a HEIF and AVIF file format decoder and encoder. In versions 1.21.2 and below, a crafted 800-byte HEIF sequence file causes an infinite loop in Box_stts::get_sample_duration(), consuming 100% CPU indefinitely with zero progress, leading to DoS. The loop has no iteration limit or timeout and is triggered during file open (parsing) - before any user interaction or image decoding. The process stays alive (no crash, no error logged), making it invisible to crash-based monitoring. This issue has been fixed in version 1.22.0."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H", "baseScore": 6.5, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "REQUIRED", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "NONE", "availabilityImpact": "HIGH"}, "exploitabilityScore": 2.8, "impactScore": 3.6}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-835"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:struktur:libheif:*:*:*:*:*:*:*:*", "versionEndExcluding": "1.22.0", "matchCriteriaId": "CB01CAAF-1D64-461B-8CC0-3CF2FBAC60A5"}]}]}], "references": [{"url": "https://github.com/strukturag/libheif/releases/tag/v1.22.0", "source": "[email protected]", "tags": ["Release Notes"]}, {"url": "https://github.com/strukturag/libheif/security/advisories/GHSA-j9g7-q9hv-gq8c", "source": "[email protected]", "tags": ["Exploit", "Vendor Advisory"]}, {"url": "https://github.com/strukturag/libheif/security/advisories/GHSA-j9g7-q9hv-gq8c", "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "tags": ["Exploit", "Vendor Advisory"]}]}}