Heap out-of-bounds write in ggml-org llama.cpp Pocket-TTS

Note: This data is for reference and cybersecurity research purposes only.CyStack advises users not to use this information for unlawful purposes.

What is CVE-2026-116096?

CVE-2026-116096 is a vulnerability classified as Out-of-bounds Write and Improper Restriction of Operations within the Bounds of a Memory Buffer, affecting llama.cpp (affected versions: 0.4.0, 0.17.1, and other affected versions). This vulnerability is rated Medium, with a CVSS score of 4.8. Public exploit code or evidence is available for this vulnerability, but that does not confirm exploitation in the wild.

Overview

Original source data

A weakness has been identified in ggml-org llama.cpp. Affected by this issue is the function list_pockettts_state_slots of the file tools/mtmd/models/pockettts-gen.cpp of the component Pocket-TTS. This manipulation of the argument mmproj causes out-of-bounds write. The attack requires local access. The exploit has been made available to the public and could be used for attacks. Upgrading to version b11796 can resolve this issue. Patch name: 0a1ef309cdbb9f2024f58a38fb4c42352c5db569. The affected component should be upgraded. The reported heap out‑of‑bounds write (gen‑audio / pocket‑tts state_out path) is no longer a silent exploitable heap write on current master and the latest release b11871 - a malicious mmproj that previously triggered it now trips a release‑active GGML_ASSERT and aborts. But the submitter's recommended by‑construction fix (PR #29360 "prevent OOB accesses from malformed mmproj files") is still open. So the root cause is detected‑and‑aborted, not prevented‑by‑design.

Affected products and scope

The supplied affected facts for ggml-org llama.cpp identify:

  • 0.4.0, 0.17.1, 55abc39, 55d4206c8, b5693, b7445, b7824, b8492, b8585, b9058, and b9060 as affected.
  • VulDB describes the affected scope as llama.cpp through b9060; the record does not provide a complete list for every intermediate commit or branch.
  • Release b11796 is identified as containing the corresponding fix.
  • The record and advisory also state that current master and b11871 no longer silently perform the reported heap out-of-bounds write for the described input, but instead trigger GGML_ASSERT and abort. This should not be interpreted as a verified fixed boundary for every later or parallel branch.
  • PR #29360, described as the by-construction fix for malformed mmproj accesses, remains open in the consulted evidence.

Technical details

ggml-org llama.cpp processes mmproj projector files in its Pocket-TTS component. The flaw is in the gen-audio path involving list_pockettts_state_slots in tools/mtmd/models/pockettts-gen.cpp and the state_out path.

At a high level, attacker-controlled metadata can make the state size declared by an mmproj disagree with the actual tensor size in the computation graph:

  1. State slots are derived from sizes declared by the mmproj.
  2. The state_out buffer is allocated from those declared sizes.
  3. During gen-audio, data is copied using the actual graph tensor size.
  4. If the actual tensor is larger than the allocated region, the copy writes past the end of the heap buffer.

The reported reproduction reaches clip_encode on the Pocket-TTS state_out path and can repeat during GEN_WAV flushes. Exploitation requires a local process to process a crafted mmproj; the available evidence does not establish every affected wrapper, projector type, or commit range.

Exploitability

The flaw is locally reachable and is not described as remotely exploitable by the available evidence. The record characterizes the attack as requiring local access, low complexity, no user interaction, and no network attack path.

A public proof-of-concept has been recorded. The project's security pull request also reports code execution demonstrated in a controlled local environment using a crafted mmproj, although detailed exploit and payload material was not published in the public discussion.

The available evidence does not establish active exploitation in the wild. On current master and release b11871, the reported malicious input instead triggers a release-active GGML_ASSERT and aborts rather than silently performing the heap write. This is detected-and-aborted behavior, not evidence that the root cause has been completely removed.

Technical impact

The flaw lets mmproj data create a mismatch between the declared state-slot sizes and the actual graph tensor sizes, producing a write beyond the end of a heap buffer. The direct result can be memory corruption, process termination, or failure of the gen-audio operation.

Project evidence indicates that the impact can extend beyond denial of service or memory corruption, with code execution demonstrated in a controlled local environment. Exploitation nevertheless requires local access to the process or the ability to cause that process to handle an attacker-supplied mmproj.

The documented impact is within the vulnerable system, and the record does not establish subsequent impact to another system. Real-world organisational consequences therefore depend on the privileges of the llama.cpp process, the data it handles, and whether Pocket-TTS accepts untrusted projectors.

Business impact

A malicious mmproj can corrupt the heap of the Pocket-TTS process, causing gen-audio work to fail or the process to terminate. Memory corruption can also affect the confidentiality and integrity of data within the process boundary; the project has reported code execution in a controlled local environment.

If llama.cpp handles sensitive data or runs with meaningful operating-system permissions, loss of control of that process could expose or alter resources available to it. The evidence does not establish privilege escalation, impact to other systems, or a specific data breach, so those outcomes should not be treated as confirmed.

Where the issue has changed to a GGML_ASSERT failure, the most visible operational consequence may be local denial of service when the process receives a malformed projector.

Remediation

  1. Upgrade the Pocket-TTS component of llama.cpp to release b11796, or apply the corresponding project fix associated with that release. This is the directly confirmed remediation in the record and advisory.
  2. Verify the deployed build tag or commit after upgrading rather than relying only on a package name or deployment date.
  3. If the system uses current master or b11871, do not treat the GGML_ASSERT abort as proof that the root cause has been prevented by design. Track PR #29360 or a successor official fix before concluding that malformed mmproj processing is fully protected.
  4. Until the upgrade is complete, restrict untrusted mmproj files from reaching Pocket-TTS processing and investigate aborts that occur while loading or using malformed projectors.

Detection

Detection should focus on where llama.cpp processes Pocket-TTS and mmproj files:

  • Inventory the llama.cpp binary, build tag, or commit and compare it with the affected versions listed in affected_summary.
  • Identify deployments that enable or call Pocket-TTS, mtmd, gen-audio, or the state_out processing path.
  • When reliable build metadata is unavailable, inspect the binary or source for list_pockettts_state_slots and tools/mtmd/models/pockettts-gen.cpp.
  • Review crash reports and process stderr for aborts or assertions while handling malformed mmproj files. Treat this as a precautionary signal, not as a confirmed IOC.
  • In an isolated test environment, exercise trusted mmproj fixtures with AddressSanitizer or UndefinedBehaviorSanitizer. A heap-buffer-overflow report on the Pocket-TTS path is evidence requiring investigation, but the absence of a report does not prove safety.
Sources (29)
Learn more

Run an in-depth assessment with complete web risk management

CyStack VulnScan continuously discovers assets, validates vulnerabilities, and helps security teams prioritize remediation across the organization.