Skip to main content

Code Graph RAG CVE-2026-77604

| EUVDEUVD-2026-117780 HIGH
Path Traversal (CWE-22)
2026-11-05 GitHub_M GHSA-vvr2-h2jp-838m
7.5
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Reach exposed MCP HTTP server on 0.0.0.0:8080
  2. Delivery
    Call read_file with absolute path plus offset/limit
  3. Exploit
    pathlib discards project_root, skipping validate_project_path
  4. Execution
    Open and read arbitrary file as server process
  5. Impact
    Exfiltrate credentials, .env, keys, and config

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK

2 techniques across 2 tactics: Discovery, Collection

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

The vulnerable code executes only when the read_file MCP tool is invoked with an offset or limit parameter set - this selects the paginated branch, which skips the @validate_project_path check; calls supplying neither parameter go through the protected non-paginated branch and are not affected. Unauthenticated remote exploitation additionally requires the server to be started as 'cgr mcp-server --transport http', which by default binds 0.0.0.0:8080 with no authentication, exposing it to the network; deployments using only the stdio transport are reachable just by local callers of the same code path. Affected only in versions prior to 0.0.345. Limiting factors: the HTTP transport must actually be enabled and network-reachable, targets are restricted to UTF-8-readable files accessible to the server process, and impact is confidentiality-only (read, not write).

Impact

Multiple signals agree this is a genuine but scoped priority rather than a widespread emergency. The CVSS 3.1 vector (AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N, 7.5 High) describes trivial, low-complexity, unauthenticated network exploitation with high confidentiality impact and no integrity/availability effect - consistent with an arbitrary file-read path traversal (CWE-22). The vuln.today decision label is 'this_week', not act_now/emergency, implying meaningful but non-critical urgency. There is NO CISA KEV listing and NO EPSS score in the supplied data, so neither confirmed active exploitation nor a modeled exploitation probability can be asserted - exploitation status is therefore limited to the public PoC. A detailed public PoC reference exists: the GHSA advisory embeds full reproduction artifacts (Dockerfile, poc.py, and an equivalent streamable-HTTP MCP client attack script), though the structured intel does not flag it as 'Publicly available (confirmed)' working exploit code. No explicit SSVC exploitation/automatable/technical-impact decision values were provided beyond the priority label. One data conflict must be flagged: the GHSA summary body states 'no patch has been released as of version 0.0.343' and marks the package 'not yet patched', while the CVE description, the release tag v0.0.345, and commit 6541e920 all confirm a fix shipped in 0.0.345 - the advisory prose is stale and the fix does exist. The AV:N rating is only realized when the HTTP transport is exposed (default bind 0.0.0.0:8080, no auth); in stdio-only deployments the same code path exists but is reachable only locally, lowering real-world network risk. Net: a real, easily exploitable unauthenticated file-read where the HTTP MCP server is network-exposed, tempered by the product's limited deployment footprint and the absence of KEV/EPSS evidence of mass exploitation.

Exploit ScenarioDerived

An unauthenticated attacker who can reach a Code Graph RAG MCP server started with '--transport http' (which by default binds 0.0.0.0:8080 with no authentication) calls the read_file tool with an absolute path such as /etc/passwd or /proc/self/environ and any offset or limit value. Because the paginated branch builds the path with Path(project_root) / file_path and pathlib discards the root when the operand is absolute, the configured boundary is bypassed and the file contents are returned. A public PoC reference exists in the GHSA advisory (Dockerfile, poc.py, and an equivalent HTTP MCP client script); given AV:N/AC:L/PR:N, exploitation is a single tool call with no special skill or timing required.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.4% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Nov 05, 2026

Unauthenticated arbitrary file read in Code Graph RAG (the code-graph-rag package) affects all versions prior to 0.0.345 by letting an attacker escape the configured project root through the MCP read_file tool. When a caller supplies an offset or limit parameter the handler takes the paginated branch, which builds Path(project_root) / file_path and opens it without the containment check that guards the non-paginated branch, so an absolute path such as /etc/passwd (or a relative ../ traversal) causes pathlib to discard the project root and returns any UTF-8-readable file the server process can access. Exploitation is unauthenticated (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N, 7.5) when the server runs as 'cgr mcp-server --transport http', which binds 0.0.0.0:8080 without authentication by default; local callers over the stdio transport reach the same code path. A public proof-of-concept with Docker and HTTP reproduction artifacts is published in the upstream GitHub security advisory, but the provided intelligence contains no evidence of active exploitation in the wild, and impact is confidentiality-only (read, not write).

RemediationAI

Vendor-released patch: upgrade to code-graph-rag 0.0.345, which resolves the project root and validates the joined path with relative_to() before opening a file (fix commit 6541e920a27961fa8f3ff49ef38c0e0bd09cd626, release at https://github.com/vitali87/code-graph-rag/releases/tag/v0.0.345, advisory https://github.com/vitali87/code-graph-rag/security/advisories/GHSA-vvr2-h2jp-838m). Because the vulnerable branch is reached through both HTTP and stdio transports, updating is the only complete fix. If upgrading cannot happen immediately, do not start the server with '--transport http' on an untrusted network: bind it to a loopback interface or place it behind network access controls instead of the default 0.0.0.0:8080, accepting that this removes remote MCP functionality and does not protect local stdio callers who can still trigger the paginated branch. Note also that patched behavior blocks reads outside the project root entirely, so any legitimate workflow that previously relied on absolute paths or traversal with offset/limit parameters will start returning an 'outside of project root' error and must use root-relative paths instead.

Affected VersionsENISA

code-graph-rag < 0.0.345

Affected Packages

pypi code-graph-rag fix: 0.0.345

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in pypi

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The flaw is CWE-22 (Improper Limitation of a Pathname to a Restricted Directory) in MCPToolsRegistry.read_file at codebase_rag/mcp/tools.py (lines 556-565 in the pre-fix source). Python's pathlib.Path / str division replaces the left operand entirely when the right operand is absolute, so Path(self.project_root) / "/etc/passwd" resolves to /etc/passwd; relative '../' sequences also escape the root. The non-paginated branch of the same method is wrapped by the @validate_project_path decorator (applied via codebase_rag/tools/file_reader.py:27, implemented at codebase_rag/decorators.py:73-75 using .resolve().relative_to(project_root)), but that decorator is never invoked on the paginated branch, so supplying offset or limit bypasses the boundary check before the open() sink. Data flow: config.py:302 sets the HTTP MCP default host to 0.0.0.0; cli.py:717 exposes 'mcp-server' and cli.py:726-731 invokes serve_http(); mcp/server.py:208-210 mounts the Starlette MCP endpoint and server.py:113-127 dispatches JSON arguments straight to the handler via await handler(**arguments), so file_path, offset and limit are fully attacker-controlled. Files are opened with UTF-8 encoding, which limits targets to UTF-8-readable content but still covers credentials, .env files, private keys, source, configuration and /proc/self/environ. The upstream fix resolves the project root and candidate path and calls relative_to(), returning an 'outside of project root' error on ValueError/RuntimeError.

Know when Code Graph Rag gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (GitHub_M) PRIMARY 7.5 HIGH
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
vuln.today AI 7.5 HIGH

Default 0.0.0.0 HTTP bind with no authentication and a trivial absolute-path bypass give AV:N/AC:L/PR:N/UI:N; arbitrary file read is confidentiality-only, so C:H/I:N/A:N.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None

Lifecycle Timeline

2
Patch available
Nov 05, 2026 - 21:18 EUVD
CVE Published
Nov 05, 2026 - 20:10 cve.org
HIGH 7.5

DescriptionCVE.org

Code Graph RAG is an AI-powered knowledge graph and retrieval system for querying, understanding, and editing multi-language codebases. Prior to 0.0.345, the MCPToolsRegistry.read_file implementation in codebase_rag/mcp/tools.py joins attacker-controlled file_path input to project_root without resolving and verifying containment when offset or limit selects the paginated branch. An absolute path causes pathlib to discard the configured root, while relative traversal can also resolve outside it. The protected non-paginated branch uses validate_project_path, but the paginated branch bypasses that validation before opening the path. An unauthenticated caller of a network-exposed HTTP MCP server can therefore read arbitrary UTF-8-readable files available to the server process, including credentials, environment data, private keys, source, and configuration; local callers through the stdio transport can reach the same vulnerable code path. This issue is fixed in version 0.0.345.

Technical POC Analysis

CWE-22 (Improper Limitation of a Pathname to a Restricted Directory).

Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.

Executive ViewAI

Why It Matters

CVE-2026-77604 is a high-severity vulnerability in Code Graph RAG (code-graph-rag) versions prior to 0.0.345. It allows unauthenticated attackers to read arbitrary files on servers running the MCP server with HTTP transport, potentially exposing sensitive data such as credentials or configuration files. Leadership should care because this could lead to data breaches, compliance violations, and reputational damage.

Business Impact: High
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations: restrict network access to the MCP server (e.g., bind to localhost or use firewall rules), disable the HTTP transport if not needed, and run the service with least privilege to limit file read exposure.

Threat Intelligence Overview

EPSS Score
0.4%
Top 68% exploitable
Prevalence
Low
niche open-source AI/MCP code tool, limited production deployment footprint
Threat Intel
1
1 source
Social Media
1
Sightings
Data Quality
5 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.4%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact
High

Priority Score

38
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +38
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy