PyPI
CVE-2026-87008
Code Graph RAG structural tools follow out-of-root symlinks
- Severity
- High 7.1
- Published
- 9 Nov 2026
- Last changed
- 9 Nov 2026
- Added to UpHeron
- 23 Nov 2026
- Fixed in
- 0.0.587
- Exploit chance
- 0.3% in the next 30 daysHigher than 18% of CVEs. EPSS by FIRST, 24 Nov 2026
- Attack
- Needs local access · No login needed · Needs someone to click or open something
- Attacker can
- Read data · Change data
- CVSS vector
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N- Also known as
- GHSA-85gg-2gfq-q95m
- Sources
- OSV.dev and GitHub
Description
A remote/local attacker who can get a symbolic link included in a source-code repository that code-graph-rag analyzes can cause the structural_search and structural_replace tools (backed by AstGrepService, exposed both as MCP tools and as agentic AI tools) to read and -- via structural_replace with dry_run=False -- overwrite arbitrary files outside the configured project root, because the tool's path-containment check (should_skip_path/_classify_file) is performed lexically on the unresolved path and never checks Path.is_symlink() or calls .resolve(), unlike the project's own (correct) validate_project_path decorator used elsewhere.
Tested at commit 90a3ed3cbdc7d3bb8036985b851cc7c9a3ba9c57 (pyproject version 0.0.550), current main at test time. Confirmed this commit already contains the fix for the prior advisory (GHSA-vvr2-h2jp-838m: paginated read_file path traversal) and the newer HTTP-MCP bearer-auth gate (_validate_http_exposure in codebase_rag/mcp/server.py) -- this is a…
Affected software
| Software | Affected versions |
|---|---|
code-graph-ragPyPI · osv:PyPI:code-graph-rag |
|
About code-graph-rag
- Weekly downloads (PyPI)
- 787PyPI Stats, 24 Nov 2026
Vulnerabilities in code-graph-rag
- In our list
- 2
- Published in the last 12 months
- 2
- Critical, last 12 months
- 0
- High, last 12 months
- 2
- Known exploited
- 0
- CVE-2026-77604Code Graph RAG: MCP paginated read_file path traversal / arbitrary file readHigh 7.5 9 Nov 2026
References
- CVE.org https://www.cve.org/CVERecord?id=CVE-2026-87008
- GitHub Advisory Database https://github.com/advisories/GHSA-85gg-2gfq-q95m