Skip to main content

gemini-bridge CVE-2026-54785

MEDIUM
Path Traversal (CWE-22)
2026-07-31 GitHub_M GHSA-c5px-58j2-7fqp
6.2
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

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

  1. Access
    Reach MCP server transport or inject LLM prompt
  2. Delivery
    Supply traversal path in files argument (e.g., /root/.ssh/id_rsa)
  3. Exploit
    Call consult_gemini_with_files with mode=inline
  4. Execution
    Server reads file outside working directory
  5. Persist
    File contents forwarded to Gemini CLI and Google
  6. Impact
    Sensitive 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 consult_gemini_with_files MCP tool with mode="inline" and attacker-controlled entries in the files argument. The MCP server must be running and reachable via its transport (stdio or socket). The attack surface encompasses: direct MCP clients with tool invocation rights, AI agents or LLMs that have been prompt-injected into calling the tool, and any automated pipeline that passes externally-influenced data as the files argument. The server process must have read permission on the targeted file (e.g., SSH keys accessible to the user running the server). Only mode="inline" is vulnerable - at_command mode is NOT affected. No code execution results; impact is limited to confidentiality (file read and secondary Google exfiltration). Per CVSS PR:N, no intra-application authentication is required to invoke the tool once transport access is established.

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 consult_gemini_with_files call with attacker-controlled paths, requiring no direct human attacker interaction. No EPSS score or KEV listing was provided, and no public exploit code has been identified, so active exploitation is not confirmed. The product is niche, limiting aggregate exposure, but deployments embedding it in automated AI pipelines with access to sensitive credential files face non-trivial real risk. No conflicts between the CVSS vector and the description were observed.

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 consult_gemini_with_files with files=['/root/.ssh/id_rsa', '../.env'] and mode="inline". The server reads both files without restriction and forwards their contents to the Gemini CLI, which echoes them back in the tool response - simultaneously sending the private key and credentials to Google's API endpoint. No public exploit code has been identified at time of analysis, but the attack requires only valid MCP tool invocation and knowledge of the file paths.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.2% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – 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

pypi gemini-bridge fix: 1.3.1

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

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

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.

3.1 AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
4.0 AV:L/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
Local
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None

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

EPSS Score
0.2%
Top 95% exploitable
Prevalence
Rare
niche MCP bridge package, small open-source community footprint
Threat Intel
1
1 source
Exploit
POC
Public exploit code exists
Social Media
2
Sightings
Data Quality
6 sources
Confidence: High
NVD CVE.org EPSS Vulnrichment GHSA CIRCL GitHub VulDB

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 MEDIUM
CISA KEV No
Public POC Yes
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.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
Defer
Exploitation
None
System Exposure· derived
Small
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

51
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +31
PoC: +20
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.

Affected Products (CPE)CVE.org

cpe:2.3:a:elyin:gemini-bridge:*:*:*:*:*:*:*:*

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