{"id":"CVE-2026-87008","published":"2026-11-05T20:13:23Z","modified":"2026-11-05T21:03:52Z","title":"Code Graph RAG structural tools follow out-of-root symlinks","vendor":"vitali87","product":"code-graph-rag","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.1,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00264,"percentile":0.18633,"provenance":"source"},"cwes":[{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"},{"id":"CWE-59","name":"Improper Link Resolution Before File Access"}],"references":[{"url":"https://github.com/vitali87/code-graph-rag/security/advisories/GHSA-85gg-2gfq-q95m","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/vitali87/code-graph-rag/commit/2648c95aa550ce2d9361a8e75ed669d5f4b451b8","tags":["x_refsource_MISC"]},{"url":"https://github.com/vitali87/code-graph-rag/releases/tag/v0.0.589","tags":["x_refsource_MISC"]}],"priority":{"score":13.7,"factors":[{"name":"EPSS percentile","points":3.73},{"name":"Public exploit code","points":5.0},{"name":"CVSS severity","points":4.97}]},"exploitSources":{"pocGithub":{"count":1,"skipped":0,"earliest":"2026-09-03","earliestUrl":"https://github.com/squeeze440/code-graph-rag-PoC","repos":[{"name":"squeeze440/code-graph-rag-PoC","url":"https://github.com/squeeze440/code-graph-rag-PoC","stars":0,"created":"2026-09-03"}]},"first":{"date":"2026-09-03","source":"PoC-in-GitHub","url":"https://github.com/squeeze440/code-graph-rag-PoC"},"provenance":"source"},"vendorSlug":"vitali87","affectedVersions":[{"vendor":"vitali87","product":"code-graph-rag","versions":["< 0.0.589"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"total","timestamp":"2026-11-05T21:03:34.665618Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"code-graph-rag","vulnerableRanges":["<0.0.587"],"patched":["0.0.587"],"from":["GHSA-85gg-2gfq-q95m"],"provenance":"source"}],"euvd":{"id":"EUVD-2026-117781","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2026-77604","published":"2026-11-05","fixed":"0.0.345","kev":false,"link":{"from":"CVE-2026-77604","to":"CVE-2026-87008","relation":"successor","confidence":"medium","kind":"sequence","orderedBy":"description","evidence":[{"kind":"version-step","provenance":"source","package":"PyPI:code-graph-rag","fromFixed":"0.0.345","toFixed":"0.0.587","daysApart":0},{"kind":"similar","provenance":"machine","score":0.37,"basis":"same product + CWE + description similarity"}]}},{"cve":"CVE-2026-87008","published":"2026-11-05","fixed":"0.0.587","kev":false}],"package":"PyPI:code-graph-rag"}}