Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-111162 Overview
CVE-2026-111162 is a heap out-of-bounds read vulnerability in WildMIDI through version 0.5.0. The flaw resides in the HMP parser function _WM_ParseNewHmp() and stems from an integer underflow when computing chunk lengths. An attacker who supplies a crafted .hmp file with a chunk length between 0 and 12 triggers an underflow that wraps to approximately 4 GB. The resulting read can crash the application or expose heap memory contents through WildMidi_GetInfo(). The weakness is classified as [CWE-125] (Out-of-bounds Read).
Critical Impact
Crafted HMP files can crash applications linked against WildMIDI or leak adjacent heap bytes to the caller.
Affected Products
- WildMIDI through 0.5.0
- Applications linking the WildMIDI library for HMP file parsing
- Downstream distributions bundling WildMIDI 0.5.0 or earlier
Discovery Timeline
- 2026-10-15 - CVE-2026-111162 published to NVD
- 2026-10-16 - Last updated in NVD database
Technical Details for CVE-2026-111162
Vulnerability Analysis
WildMIDI is a MIDI synthesizer library used by media players and game engines. The HMP (Human Machine Interface Protocol) parser _WM_ParseNewHmp() in src/f_hmp.c reads a 32-bit chunk length from the file and then subtracts a fixed header size before using the result as a buffer bound. When the attacker-controlled chunk length is smaller than the subtracted constant (values 0 through 12), the unsigned subtraction underflows and produces a value near 4 GB. Downstream code treats this huge value as a valid length and reads past the allocated heap buffer. Depending on the surrounding allocation, this behavior yields a process crash or copies out-of-bounds heap bytes into fields later exposed through WildMidi_GetInfo().
Root Cause
The root cause is missing lower-bound validation on the chunk length field prior to arithmetic. The parser trusts the file-supplied length and performs an unchecked unsigned subtraction, producing an integer underflow. Combined with absent sanity checks before the subsequent read loop, the underflowed value drives an out-of-bounds access against the heap allocation holding the MIDI event buffer referenced in src/internal_midi.c.
Attack Vector
Exploitation requires a local user to open a malicious .hmp file in an application that uses WildMIDI. User interaction is required because the victim must load the crafted file. No elevated privileges are needed. The primary outcomes are denial of service and disclosure of heap memory that may contain sensitive residual data from the same process. See the VulnCheck WildMIDI Advisory and the HackMD WildMIDI Analysis for a detailed walkthrough. The vulnerable code paths are visible in f_hmp.c lines 258-261 and internal_midi.c lines 2166-2172.
Detection Methods for CVE-2026-111162
Indicators of Compromise
- Unexpected crashes or SIGSEGV signals in processes linking libWildMidi while opening .hmp files.
- .hmp files whose chunk length fields contain values in the range 0 to 12.
- Anomalous output from applications calling WildMidi_GetInfo() that contains non-printable or structurally invalid data.
Detection Strategies
- Scan file repositories and user downloads for .hmp files and parse their chunk headers to flag undersized length fields.
- Run WildMIDI-linked binaries under AddressSanitizer or Valgrind in test environments to surface heap out-of-bounds reads before deployment.
- Build YARA or content rules that identify HMP chunks with length fields below the minimum valid size.
Monitoring Recommendations
- Collect crash telemetry from media processing hosts and alert on repeated faults originating in _WM_ParseNewHmp frames.
- Monitor endpoints for the installation of unpatched WildMIDI 0.5.0 or earlier through software inventory tooling.
- Track process behavior when audio or MIDI files arrive from untrusted sources, including email attachments and shared drives.
How to Mitigate CVE-2026-111162
Immediate Actions Required
- Inventory systems and applications that link WildMIDI 0.5.0 or earlier and prioritize them for patching.
- Restrict parsing of untrusted .hmp files, particularly from email, web downloads, and removable media.
- Disable HMP format support in dependent applications where it is not required.
Patch Information
No fixed release was identified in the enriched advisory data at the time of writing. Monitor the GitHub WildMIDI Repository for a release that adds a lower-bound check on the HMP chunk length before the subtraction in _WM_ParseNewHmp(). Downstream distributions should rebuild packages against the fixed source once published.
Workarounds
- Sandbox media players and converters that use WildMIDI using seccomp, AppArmor, or SELinux profiles to limit the impact of a crash or heap read.
- Pre-filter .hmp files with a validator that rejects chunk length fields below the minimum header size.
- Remove or disable the WildMIDI HMP code path at build time in environments that do not require HMP playback.
# Configuration example: block .hmp files at an ingestion proxy
iptables -A INPUT -m string --algo bm --string ".hmp" -j LOG --log-prefix "HMP-FILE: "
find /var/media -name '*.hmp' -exec chmod 000 {} \;
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

