HIGH · CVSS 3.1 7.8 EPSS 0.2% · 5th percentile CWE-190CWE-681CWE-787

CVE-2026-114495: codebase-memory-mcp: Heap buffer overflow on artifact import via int-truncated decompression capacity

Published 2026-12-01 · Updated 2026-12-01 · Also known as GHSA-8xwq-xv2x-853r

Summary

A heap buffer overflow exists in codebase-memory-mcp due to integer-truncated decompression capacity during artifact import. Engineering and security teams using vulnerable versions should upgrade immediately.

Who is affected

Deployments that index untrusted repositories containing a .codebase-memory/ artifact are affected. Attackers can achieve a reliable crash or potential code execution by supplying a crafted repository without requiring extra user interaction beyond indexing.

Exploitability

The vulnerability requires local access with low attack complexity and user interaction (indexing a repository), yielding a CVSS base score of 7.8 (High) for confidentiality, integrity, and availability impact. The EPSS score is 0.002 with no CISA KEV listing, indicating current exploitation in the wild is not documented.

Remediation

How to check your project

Automated analysis of the published advisory data, generated 2026-12-01. Not human-reviewed; verify against the official advisory. How this works.

Affected packages

EcosystemPackageAffected versionsFixed inUpgrade
PyPI codebase-memory-mcp >= 0, < 0.9.0 0.9.0 python -m pip install 'codebase-memory-mcp>=0.9.0'
npm codebase-memory-mcp >= 0, < 0.9.0 0.9.0 npm install [email protected]

CVSS 3.1 vector

CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Attack vectorLocal
Attack complexityLow
Privileges requiredNone
User interactionRequired
ScopeUnchanged
ConfidentialityHigh
IntegrityHigh
AvailabilityHigh

FAQ

What causes the vulnerability?

The vulnerability is caused by a heap buffer overflow where the decompression capacity handed to the Zstandard decompressor was truncated to an integer, leading to a huge size_t allocation mismatch.

What packages are affected?

The PyPI and npm packages for codebase-memory-mcp introduced in versions prior to 0.9.0 are affected.

Is there active exploitation documented?

Active exploitation is not documented; the CISA Known Exploited Vulnerabilities status is no.

Original advisory description
### Summary When a repository contains a `.codebase-memory/` artifact, indexing it imports the artifact automatically. Before 0.9.0 the decompression buffer was allocated with the 64-bit `original_size` from the attacker-controlled `artifact.json`, but the capacity handed to the Zstandard decompressor was truncated to `int`. A size with bit 31 set became negative, was sign-extended back to a huge `size_t`, and the decompressor wrote the frame's full content past the real allocation. ### Impact Indexing a malicious repository could corrupt heap memory with attacker-controlled bytes: a reliable crash and potentially code execution. No extra interaction beyond indexing the repository is needed. ### Patches Fixed in stable 0.9.0. The import path takes the decompressed size from the Zstandard frame header, validates it against the metadata and a size cap, and uses the same size_t capacity for allocation and decompression. The decoded length is checked. codebase-memory-mcp has verified this correction in published v0.12.1, together with the size-mismatch regression. That regression is not a direct multi-gigabyte reproduction; this advisory does not claim that all decompression resource-exhaustion cases are eliminated. ### Workarounds Upgrade to a fixed release; the codebase-memory-mcp verified recommendation is v0.12.1. On affected versions, avoid indexing untrusted repositories that contain a .codebase-memory/ artifact. ### Credit Reported privately by Aaron (@aaronjmars). codebase-memory-mcp thanks them for the precise report and re-verification.

References

Source records: GHSA-8xwq-xv2x-853r (OSV.dev) · EPSS by FIRST, 2026-12-01.