Description
libmodplug through 0.8.9.1 contains an out-of-bounds read in pat_smplooped in src/load_pat.cpp. The function validates only the upper bound of its sample index against MAXSMP and then subtracts one before indexing the 191-byte static array pat_loops, so an index of zero reads pat_loops[-1], one byte before the array. The index is the smpno field of a parsed MIDI event, which is initialised to zero and only later overwritten from a program-change parameter, so an event reaching the note test before an instrument is assigned carries zero. A 32-byte MIDI file supplied to the library's public ModPlug_Load entry point drives the path through CSoundFile::Create, CSoundFile::ReadMID, and MID_ReadPatterns to the read. The byte read out of bounds determines whether a note event is treated as looping, so adjacent static storage influences playback state.
Published: 2026-08-18
Score: 4.8 Medium
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The library uses a static 191-byte array for pattern loops. When an incoming MIDI event has an unmapped sample index of zero, the code subtracts one before indexing, causing an out‑of‑bounds read of the byte before the array. This read can leak adjacent static data and influences whether a note event is treated as looped, potentially exposing internal data or subtly altering playback but not enabling code execution.

Affected Systems

Konstanty Bialkowski's libmodplug, versions 0.8.9.1 and earlier, are affected. Applications that load MIDI files into libmodplug (e.g., through the public ModPlug_Load API) can trigger the flaw. The vulnerability is present in all builds of libmodplug prior to 0.8.9.2.

Risk and Exploitability

The CVSS score of 4.8 indicates moderate impact. The EPSS score is not available, and the vulnerability is not listed in CISA KEV, suggesting no known widespread exploitation. The likely attack vector is local or remote file injection via a crafted 32‑byte MIDI file that is parsed by the library. An attacker could read uncontrolled data adjacent to the pattern loop table, which may reveal application memory state. Because the flaw only influences playback logic, the risk of privilege escalation or arbitrary code execution is low, but the confidentiality concern remains.

Generated by OpenCVE AI on August 18, 2026 at 16:32 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade libmodplug to version 0.8.9.2 or later, which removes the out‑of‑bounds read.
  • Validate or sanitize incoming MIDI files before passing them to ModPlug_Load, rejecting files that exceed the minimal 32‑byte size or contain unexpected patterns.
  • Run the application in a sandbox or with reduced privileges so that even if an out‑of‑bounds read occurs, the process cannot leverage it for broader impact.

Generated by OpenCVE AI on August 18, 2026 at 16:32 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Tue, 18 Aug 2026 16:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Tue, 18 Aug 2026 15:30:00 +0000

Type Values Removed Values Added
Description libmodplug through 0.8.9.1 contains an out-of-bounds read in pat_smplooped in src/load_pat.cpp. The function validates only the upper bound of its sample index against MAXSMP and then subtracts one before indexing the 191-byte static array pat_loops, so an index of zero reads pat_loops[-1], one byte before the array. The index is the smpno field of a parsed MIDI event, which is initialised to zero and only later overwritten from a program-change parameter, so an event reaching the note test before an instrument is assigned carries zero. A 32-byte MIDI file supplied to the library's public ModPlug_Load entry point drives the path through CSoundFile::Create, CSoundFile::ReadMID, and MID_ReadPatterns to the read. The byte read out of bounds determines whether a note event is treated as looping, so adjacent static storage influences playback state.
Title libmodplug <= 0.8.9.1 - Out-of-Bounds Read in pat_smplooped via Crafted MIDI File
First Time appeared Konstanty Bialkowski
Konstanty Bialkowski libmodplug
Weaknesses CWE-125
CPEs cpe:2.3:a:konstanty_bialkowski:libmodplug:*:*:*:*:*:*:*:*
Vendors & Products Konstanty Bialkowski
Konstanty Bialkowski libmodplug
References
Metrics cvssV3_1

{'score': 3.3, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N'}

cvssV4_0

{'score': 4.8, 'vector': 'CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N'}


Subscriptions

Konstanty Bialkowski Libmodplug
cve-icon MITRE

Status: PUBLISHED

Assigner: VulnCheck

Published:

Updated: 2026-08-18T15:36:11.749Z

Reserved: 2026-08-18T14:53:24.138Z

Link: CVE-2026-75904

cve-icon Vulnrichment

Updated: 2026-08-18T15:36:08.576Z

cve-icon NVD

Status : Received

Published: 2026-08-18T16:18:22.540

Modified: 2026-08-18T16:18:22.540

Link: CVE-2026-75904

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-18T17:30:15Z

Weaknesses