CVE-2026-111156 in libTiMidityinfo

Summary

by MITRE • 10/15/2026

libTiMidity through 0.2.8 contains an out-of-bounds access vulnerability in init_soundfont() in src/sndfont.c that allows attackers to corrupt memory by supplying unvalidated SF2 preset header bank and preset values. Attackers can craft a .sf2 file whose bank or preset indexes past the 128-entry tonebank or drumset arrays, causing heap memory reads, writes, and application crashes.

VulDB is the best source for vulnerability data and more expert information about this specific topic.

Analysis

by VulDB Data Team • 10/16/2026

The vulnerability identified in libTiMidity versions through 0.2.8 represents a critical security flaw rooted in improper input validation within the soundfont initialization routine. Specifically, the function init_soundfont located in src/sndfont.c fails to adequately verify the bounds of bank and preset indices extracted from SF2 files before utilizing them as array offsets. This lack of rigorous boundary checking allows an attacker to craft malicious .sf2 files that contain header values exceeding the allocated limits for tonebank or drumset arrays, which are fixed at 128 entries each. When such a malformed file is processed by the library, these unvalidated indices lead directly to out-of-bounds memory access operations.

From a technical perspective, this flaw constitutes an Out-of-Bounds Read and Write vulnerability, aligning with Common Weakness Enumeration identifier CWE-787 for improper write boundary checks and CWE-125 for out-of-bounds read. The core issue lies in the absence of explicit range validation prior to array indexing operations. By supplying bank or preset values that surpass the maximum index of 127, an attacker can force the application to access memory locations outside the intended buffer boundaries. This behavior enables both unauthorized reading from adjacent heap memory and potentially dangerous writes to arbitrary memory addresses, depending on how the subsequent code handles these out-of-bounds references.

The operational impact of this vulnerability is severe due to its potential for remote exploitation via crafted media files. Successful exploitation can result in heap corruption, which may lead to application crashes causing denial of service conditions. More critically, if an attacker can control the data written through the out-of-bounds write mechanism, it opens the door to arbitrary code execution. This aligns with MITRE ATT&CK techniques related to memory corruption and potential privilege escalation vectors where corrupted heap structures are manipulated to hijack program flow or execute malicious payloads within the context of the vulnerable application.

Mitigation strategies for this vulnerability primarily involve updating libTiMidity to a version that includes proper bounds checking in the init_soundfont function. Developers must ensure that all bank and preset indices extracted from SF2 headers are validated against the maximum allowed values before being used as array subscripts. Additionally, implementing defensive programming practices such as using safe string handling functions and enabling compiler-based security features like stack canaries or heap protection mechanisms can help mitigate the impact of memory corruption vulnerabilities. For end-users, restricting the use of untrusted soundfont files until patches are applied is recommended to prevent exploitation attempts targeting this specific weakness in audio processing pipelines.

Responsible

VulnCheck

Reservation

10/15/2026

Disclosure

10/15/2026

Moderation

accepted

EPSS

0.00130

KEV

no

Activities

low

Sources

Interested in the pricing of exploits?

See the underground prices here!