News · DiggingBeagle record

Two Codebase Memory MCP flaws crossed different native memory boundaries

Maintainer advisories document an artifact decompression allocation error and a separate graph-query projection overflow, both addressed in v0.9.0. They share a project and a fixed version but not a root cause or proven exploitation history.

Published
Nov 23, 2026

The report

Codebase Memory MCP had two independently described native-memory safety defects that could be reached through different agent-adjacent workflows. One affected compressed repository artifacts during import; the other affected graph-query projection parsing. Both were addressed in version 0.9.0, but combining their affected code paths into one alleged exploit chain would misstate the evidence.

An artifact header reached the allocation size

The artifact-import advisory describes a 64-bit original-size value from a compressed input being converted to a narrower signed allocation capacity. Under crafted conditions, the allocated buffer could be too small for the decoded data, producing memory corruption and a crash. An agent need not issue a malicious shell command for such data to matter: an apparently routine repository ingestion can invoke native decompression logic on attacker-influenced bytes.

The advisory discusses possible code execution as an impact, but the record inspected for this research does not show an independently verified production compromise or a demonstrated working arbitrary-code-execution chain.

A graph query exceeded a fixed stack array

The separate graph-query advisory concerns the query_graph parser. A query with more RETURN or WITH projection entries than a fixed buffer could hold caused a stack out-of-bounds write. This is not a decompression bug, and controls aimed only at compressed-file limits would not protect the graph parser. Similarly, validating that a graph query is superficially well formed does not establish that its projection count respects an internal array bound.

Why the two records stay separate

A patch version and a vendor identity are useful for operator remediation, not proof of one shared causal incident. The artifact import Case and graph parser Case retain their distinct prerequisites, affected functions and uncertainties. Both illustrate that agent tools inherit all the memory-safety risks of their underlying native components. The credible response is bounded data parsing with regression tests for each path, not an instruction that the model must avoid unsafe prompts.

Research behind this