Technical impact
AstGrepService enumerates files under project_root and relies on should_skip_path, but the containment check uses unresolved lexical paths. A symbolic link planted inside the repository can reference a file outside the configured root while still appearing in scope, illustrating a path‑traversal weakness (CWE‑22) and a symbolic‑link traversal flaw (CWE‑59). 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 triggers structural replacement without the agent‑loop approval control. An attacker who forces a victim to analyze a repository containing such a link can read sensitive files such as credentials, keys, environment files, or sibling source code, or modify files accessible to the code‑graph‑rag process. This vulnerability allows information disclosure and modification of files, potentially leading to data compromise.
Affected Systems
The vulnerability affects the Code Graph RAG system developed by vitali87, specifically the code-graph-rag repository. All releases prior to version 0.0.589 are vulnerable. Versions 0.0.589 and later contain a fix that resolves path resolution and containment checks. No other vendors or products are listed as affected.
Risk and Exploitability
The CVSS score of 7.1 indicates high severity, but the EPSS score is not available, so current exploitation likelihood is unknown. The vulnerability is not listed in the CISA KEV catalog. Exploitation requires an attacker to supply or influence a repository that contains a malicious symbolic link. If the code‑graph‑rag process runs with elevated privileges or has write access to repository files, the attacker can not only read but also overwrite files, potentially enabling further compromise. The attack vector is likely local or remote, depending on how the tool is accessed; an unauthenticated user who can submit a repository for analysis could trigger the exploit. Because the flaw bypasses approval gates, mitigating the risk generally requires infrastructure controls or the vendor patch.
Github GHSA