Code Graph RAG structural tools follow out-of-root symlinks
CVE-2026-87008
A remote/local attacker who can get a symbolic link included in a source-code repository that code-graph-rag analyzes can cause the structuralsearch and structuralreplace tools (backed by AstGrepService, exposed both as MCP tools and as agentic AI tools) to read and -- via structuralreplace with dryrun=False -- overwrite arbitrary files outside the configured project root, because the tool's path-containment check (shouldskippath/classifyfile) is performed lexically on the unresolved path and never checks Path.issymlink() or calls .resolve(), unlike the project's own (correct) validateprojectpath 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 readfile path traversal) and the newer HTTP-MCP bearer-auth gate (validatehttpexposure in codebaserag/mcp/server.py) -- this is a distinct, still-open issue on top of those fixes, in a different component with a different root cause and a strictly worse impact (write, not just read). Details AstGrepService (codebaserag/tools/astgrepservice.py) backs…
Proof-of-concept code is published
Public PoC
- Public PoCsqueeze440/code-graph-rag-PoC
Signals come from Exploit-DB, Metasploit, Nuclei and published proof-of-concept repositories. Their absence means nothing was found, not that nothing exists.
Assessment
- CVSS
- 7.1 (v3.1)
- Severity
- High
- EPSS
- 0.00264% chance of exploitation in the next 30 days
- Known exploited
- Not listed in CISA KEV
- Exploit availability
- Public PoC
- Published
- 9 November 2026
- Last updated
- 9 November 2026
- Affected
- code-graph-rag
- Weakness
- CWE-22, CWE-59
CVSS vectorCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N
At the source
References
- https://github.com/vitali87/code-graph-rag/security/advisories/GHSA-85gg-2gfq-q95m
- https://nvd.nist.gov/vuln/detail/CVE-2026-87008
- https://github.com/vitali87/code-graph-rag/commit/2648c95aa550ce2d9361a8e75ed669d5f4b451b8
- https://github.com/vitali87/code-graph-rag/releases/tag/v0.0.589
- https://github.com/advisories/GHSA-85gg-2gfq-q95m
Community proofs of concept
No community proof of concept yet. If you have one for a published vulnerability and the right to share it, add it below — it will appear here once reviewed.
Submit a proof of concept
Only for publicly disclosed vulnerabilities, and only material from testing you were authorised to perform. This platform does not buy, sell, or broker exploits — see earning from vulnerability research for legitimate bounty programs. Submissions are reviewed before they appear. Text only; do not include live credentials, personal data, or anything targeting systems you are not permitted to test.
Query this programmatically
Agents can read this through the MCP endpoint, or over HTTP:
curl https://cve.zerocrew.in/api/cve/CVE-2026-87008