codebase-memory-mcp: Windows UI route could kill any process
codebase-memory-mcp graph UI - process-kill route skipped the ownership check on Windows, so any process could be terminated (GHSA-r2qv-x3rg-p49m)
Fixed by removing the route in 0e00ef5, part of #1139 (merged 2026-07-23). First fixed native and npm release 0.9.1-rc.1; first verified fixed stable PyPI release 0.10.0. 0.12.1 is the recommended upgrade. Track the fix at DeusData/codebase-memory-mcp#1139.
- Product
- codebase-memory-mcp (npm and PyPI package codebase-memory-mcp, plus release binaries), optional graph UI in DeusData/codebase-memory-mcp
- Affected versions
- codebase-memory-mcp on Windows with the optional graph UI enabled: native and npm builds before 0.9.1-rc.1 (2026-07-30), PyPI before 0.10.0 (2026-08-10). The maintainer recommends 0.12.1 (2026-10-16) for every distribution.
- Severity
- MEDIUM
- Status
- Patched
- Weaknesses
- CWE-862Missing Authorization
- GitHub advisory
- GHSA-r2qv-x3rg-p49m
Published by the maintainer on 2026-11-17 - CVE
- CVE-2026-114497
- Published
- Credit
- Finder: Aaron Elijah Mars of Aeon. Tool: Aeon (https://www.aeon.fun).
What users should do now
- Upgrade codebase-memory-mcp to 0.12.1, the release the maintainer verified and recommends for every distribution (npm, PyPI and release binaries). 0.9.1-rc.1 is the first fixed native and npm build, and 0.10.0 the first verified fixed stable PyPI release. The maintainer advises against relying on older prerelease packages.
- Restart any running server after the upgrade so the old UI server is gone.
- Until you upgrade, do not enable the optional graph UI on Windows (the
--uiinstall option or--ui=trueat run time).
Summary
codebase-memory-mcp indexes a code repository into a graph that AI coding agents can query over MCP. An optional build adds a 3D graph UI served over HTTP on the local machine (port 9749 by default). That UI server had a POST /api/process-kill route that took a JSON body with a pid and ended that process, so the UI could cancel indexing jobs it had launched. On macOS and Linux the handler first checked that the PID matched one of its own running index jobs and refused anything else. On Windows that check sat inside a block compiled only for non-Windows builds, and the job table did not even record a child PID there, so the only refusal left was the server's own PID. Every other PID went straight to OpenProcess and TerminateProcess. The loopback Host-header check added in 0.9.0 did not close this gap.
Affected versions
codebase-memory-mcp on Windows with the optional graph UI enabled: native and npm builds before 0.9.1-rc.1, and PyPI releases before 0.10.0. Builds without the UI, and the UI on macOS and Linux, are not affected by this issue. The UI server binds to loopback only, so the requester has to be able to send HTTP requests to that port on the same machine, for example another local program or user.
Impact
- Any process can be ended. One request can terminate any process the server's Windows account is allowed to terminate: editors, the AI coding agent, other developer tools, or anything else running as that user.
- Lost work. Ending a process this way gives it no chance to save, so unsaved work in the killed program can be lost.
- Availability only. No data is read or changed and nothing is sent anywhere. Processes the user's account cannot terminate stay safe.
Scored 5.5 (CVSS 3.1 AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H) on the advisory.
Affected code
Permalinks at a688d85, the commit just before the fix.
- The index job record only tracks a child PID on non-Windows builds: src/ui/http_server.c#L139-L153
- The
POST /api/process-killhandler, which reads anypidfrom the request body: src/ui/http_server.c#L579-L647 - The ownership check against the server's own index jobs, wrapped in
#ifndef _WIN32so Windows builds skip it: src/ui/http_server.c#L611-L628 - The Windows path that opens the target and calls
TerminateProcesson it: src/ui/http_server.c#L630-L638 - Route registration: src/ui/http_server.c#L1822-L1826
Fix
- 0e00ef5 ("coordinate concurrent CBM sessions"), part of #1139, removes
handle_process_killand the/api/process-killroute from the UI server entirely, rather than adding the missing Windows check. Released in 0.9.1-rc.1 for native and npm builds and in 0.10.0 on PyPI. - The maintainer verified that published 0.12.1 has no arbitrary-PID process-kill route and that the old path returns 404.
- On
maintoday (checked at649eb5e) the route is still absent, and a regression test, ui_server_process_kill_route_is_unavailable, asserts that a kill request gets a 404. Its comment notes that jobs are now cancelled with owner-bound handles instead of raw PIDs.
Detection (for defenders)
On Windows machines running an affected build with the UI on, look for programs that closed suddenly without an error dialog while codebase-memory-mcp was running, and for local POST /api/process-kill requests to the UI port (9749 by default) that did not come from someone using the UI. On a fixed build the same request returns 404. A working exploit is withheld.
Timeline
- Reported privately via GitHub PVR as part of a larger report (GHSA-vpgh-g3jg-ggx9).
- codebase-memory-mcp 0.9.0 released with a loopback Host-header check on the UI server; the Windows PID check is still missing.
- Fix commit 0e00ef5 removes the process-kill route.
- Maintainer merges #1139, which carries the fix.
- codebase-memory-mcp 0.9.1-rc.1 released, the first fixed native and npm build.
- codebase-memory-mcp 0.10.0 released, the first verified fixed stable PyPI release.
- Maintainer splits this issue into its own advisory and requests a CVE through GitHub.
- codebase-memory-mcp 0.12.1 released; the maintainer later verifies it and recommends it for every distribution.
- GitHub assigns CVE-2026-114497.
- Maintainer publishes GHSA-r2qv-x3rg-p49m with CVE-2026-114497; public write-up.
Credit
Finder: Aaron Elijah Mars of Aeon. Tool: Aeon.
References
- Fix PR (merged 2026-07-23): DeusData/codebase-memory-mcp#1139; fix commit 0e00ef5
- First fixed releases: codebase-memory-mcp 0.9.1-rc.1 (native and npm), codebase-memory-mcp 0.10.0 (PyPI)
- Recommended release: codebase-memory-mcp 0.12.1
- GitHub advisory: GHSA-r2qv-x3rg-p49m
- CVE: CVE-2026-114497
- Affected repository: DeusData/codebase-memory-mcp