gemini-bridge
CVE-2026-54785
MEDIUM
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessReach MCP server transport or inject LLM prompt
-
DeliverySupply traversal path in files argument (e.g., /root/.ssh/id_rsa)
-
ExploitCall consult_gemini_with_files with mode=inline
-
ExecutionServer reads file outside working directory
-
PersistFile contents forwarded to Gemini CLI and Google
-
ImpactSensitive data returned in tool response to attacker
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 | Exploitation requires the ability to invoke the |
| Impact | The CVSS 3.1 base score of 6.2 (AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N) accurately reflects a local, zero-complexity attack with high confidentiality impact and no integrity or availability consequence. The PR:N designation is notable: no intra-application authentication guards invocation of the MCP tool, meaning any process or agent able to reach the MCP transport can trigger the read without additional OS-level privileges. The real-world risk is amplified by two factors not captured in the base score: first, the secondary exfiltration of file contents to Google's infrastructure via Gemini CLI (a data-sovereignty concern in regulated environments); second, the prompt-injection vector, where a malicious document or web page processed by an LLM driving the agent could inject a |
| Exploit ScenarioDerived | A threat actor who can prompt-inject an LLM driving a gemini-bridge-connected agent embeds a hidden instruction in a processed document directing the LLM to call |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jul 31, 2026
Arbitrary local file read in gemini-bridge (versions 1.0.0-1.3.0) exposes any file accessible to the server process - SSH keys, cloud credentials, .env files, source code - through the consult_gemini_with_files tool when operating in inline mode. Compounding the local disclosure, file contents are simultaneously exfiltrated to Google's infrastructure via the Gemini CLI round-trip, extending blast radius beyond the local host. No public exploit identified at time of analysis, but the CVSS vector (AV:L/AC:L/PR:N/UI:N) indicates trivially low exploitation complexity, and the GHSA advisory explicitly calls out prompt-injection as a realistic delivery vector for AI agent pipelines. Vendor-released patch available in version 1.3.1.
RemediationAI
Upgrade to gemini-bridge version 1.3.1, released 2026-06-09, which resolves the path traversal by enforcing symlink-resolved directory confinement in _resolve_path via Path.relative_to(root), matching the existing at_command mode behavior. The patched release is confirmed at https://github.com/eLyiN/gemini-bridge/releases/tag/v1.3.1 and the fix commit is 8f3b85afd02b692c4bc974b5176e12fb277ea801. Prior to upgrading, the vendor advisory recommends avoiding mode="inline" entirely with any untrusted files input - switching to at_command mode is a viable workaround since that mode already enforced path confinement. As an additional compensating control, run the gemini-bridge server process under a restricted OS user account with minimal filesystem access, particularly excluding SSH key directories, credential stores, and .env files; this limits what files can be read even if the path traversal is triggered. In AI agent pipelines, restrict which MCP clients or LLMs are authorized to invoke consult_gemini_with_files, and treat any document or external content processed by the driving LLM as potentially untrusted to mitigate prompt-injection delivery.
Affected Packages
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
gemini-bridge is a Python pip package (cpe:2.3:a:elyin:gemini-bridge:*:*:*:*:*:*:*:*) implementing the Model Context Protocol (MCP) to bridge AI agent workflows to Google's Gemini CLI. The vulnerable surface is the consult_gemini_with_files(query, directory, files, …) function in src/mcp_server.py, specifically when called with mode="inline". In that mode, caller-supplied entries in the files argument passed through _prepare_inline_payload → _read_file_for_inline without a directory-confinement check. The root cause (CWE-22: Path Traversal) is that _resolve_path computed an out-of-bounds absolute path but only nullified the *display name*, not the actual read operation - meaning absolute paths, ../ traversal sequences, and symlinks pointing outside the working directory were all silently dereferenced. The at_command mode already enforced Path.relative_to(root) confinement; inline mode lacked the equivalent guard entirely. The fix in 1.3.1 applies Path.resolve() to both the root and candidate before calling relative_to, and skips any entry resolving outside the root with a warning rather than reading it.
Know when Gemini Bridge 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
AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
AV:L reflects local MCP transport access; PR:N since no intra-application auth guards tool invocation; C:H for arbitrary file read of any process-accessible file.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
DescriptionCVE.org
gemini-bridge is a lightweight MCP server bridging AI agents to Google's Gemini AI via the official CLI. From 1.0.0 until 1.3.1, consult_gemini_with_files in inline mode read any file path supplied in the files argument without confining it to the working directory, then forwarded the contents to the Gemini CLI. Because the caller also controls query, the file contents are echoed back through the Gemini round-trip (and sent to Google), making this an arbitrary local file read. This issue is fixed in version 1.3.1.
Threat Intelligence Overview
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.
GHSA-c5px-58j2-7fqp
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB