CVE-2026-87008 · AI agents & MCP
NO FIX YET · SEE WHAT TO DO
Code Graph RAG, an AI tool that builds a knowledge graph of code, follows symbolic links inside an analyzed repository to files outside the configured project root. An attacker who gets a victim to analyze a repository containing such a link can read credentials and environment files, and can overwrite writable files through the structural replace tool.
first public Aug 10, 2026 · 1 source
Check it with your coding agent
It checks your repository and tells you if you’re affected, with the fix.
Teams that run Code Graph RAG (including its MCP server) against repositories they did not fully author, since a planted symlink is the trigger. Exposure depends on whether the process can read secrets or write files outside the project root. Setups that only analyze trusted repositories with no untrusted symlinks are lower risk.
Not affected if trusted-repositories-only, version-0.0.589-or-later
Who cares ai-agents, code-graph-rag, mcp, python
0.0.589.find . -type l.0.0.589.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.
Are you affected?
Tell InfraStack what you run. It checks this one, and every next one, against your stack.
Ask from here. InfraStack checks the affected versions against your stack and answers in your inbox.
InfraStack checks the affected versions against your stack and answers in Slack, with the evidence and the fix.
NVD data is provided by NIST and is public domain. Posts quoted belong to their authors.