Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. code-graph-rag
  4. ›
  5. CVE-2026-87008

CVE-2026-87008: Code Graph RAG structural tools follow out-of-root symlinks

November 9, 2026

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 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).

References

  • github.com/advisories/GHSA-85gg-2gfq-q95m
  • github.com/vitali87/code-graph-rag/commit/2648c95aa550ce2d9361a8e75ed669d5f4b451b8
  • github.com/vitali87/code-graph-rag/releases/tag/v0.0.589
  • github.com/vitali87/code-graph-rag/security/advisories/GHSA-85gg-2gfq-q95m
  • nvd.nist.gov/vuln/detail/CVE-2026-87008

Code Behaviors & Features

Detect and mitigate CVE-2026-87008 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions before 0.0.587

Fixed versions

  • 0.0.587

Solution

Upgrade to version 0.0.587 or above.

Impact 7.1 HIGH

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

Learn more about CVSS

Weakness

  • CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
  • CWE-59: Improper Link Resolution Before File Access ('Link Following')

Source file

pypi/code-graph-rag/CVE-2026-87008.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 11 Nov 2026 00:16:24 +0000.