CVE-2026-54785: Gemini bridge Gemini-bridge Vulnerable To Arbitrary Local Vulnerability

MODERATE
Advisory Identifier: GHSA-c5px-58j2-7fqp
CVSS 6.2
CWE-200 CWE-22
Published
Advisory Summary

CVE-2026-54785 is a MODERATE (CVSS 6.2) gemini-bridge vulnerable to arbitrary local vulnerability (CWE-200: Exposure of Sensitive Information to an Unauthorized Actor) affecting Gemini bridge libraries in the PyPI ecosystem. The issue involves gemini-bridge vulnerable to arbitrary local file read via consult_gemini_with_files inline mode. Remediation is available by upgrading affected packages to version 1.3.1.

CVE-2026-54785 at a Glance

CVE Identifier CVE-2026-54785
GHSA Identifier GHSA-c5px-58j2-7fqp
Severity MODERATE
CVSS v3.1 Base Score 6.2
CWE Classification CWE-200: Exposure of Sensitive Information to an Unauthorized Actor
Affected Product Gemini bridge
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 6.2

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N).

Attack Vector Local (AV:L)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2026-54785

To remediate this vulnerability, upgrade all affected Gemini bridge dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

gemini-bridge fixed: 1.3.1
pip install gemini-bridge>=1.3.1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show gemini-bridge

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2026-54785, inspect your installed packages using pip:

pip show gemini-bridge

Analyze the terminal output to locate any version of Gemini bridge in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.3.1), your application is affected.

Note: The pip show gemini-bridge command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-200: Exposure of Sensitive Information to an Unauthorized Actor, where the product exposes sensitive information to an actor that is not explicitly authorized to have access to that information. In Gemini bridge, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Summary `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. ### Impact An MCP client — or an LLM that has been prompt-injected into calling the tool — can read **any file the server process can access** (SSH keys, cloud credentials, `.env`, source) and have it disclosed via the tool response. No code execution by itself. ### Affected component - Tool: `consult_gemini_with_files(query, directory, files, …)`, `mode="inline"` - Sink: `_read_file_for_inline` via `_prepare_inline_payload` in `src/mcp_server.py` - The `at_command` mode already confined paths; inline mode did not. ### Root cause `_resolve_path` returned an out-of-root path while only nullifying the *display* name, and `_prepare_inline_payload` read the file regardless. Absolute paths, `..` traversal, and symlink escapes were all accepted. ### Patch Fixed in **1.3.1**. `_resolve_path` now resolves symlinks and confines via `Path.relative_to(root)`; inline mode skips any entry that resolves outside the working directory (the same guard `at_command` already enforced). ### Workarounds Upgrade to 1.3.1. Before upgrading, avoid `mode="inline"` with untrusted `files` input, or run the server with a restricted-permission user. ### Credit Reported privately by Zhihao Zhang (WPI).

CVE-2026-54785 Affected Gemini bridge Versions

1 component(s)
Fixed Versions:
1.3.1
Product / Package Ecosystem Affected Versions Fixed Version
gemini-bridge
PyPI
≥ 1.0.0
< 1.3.1
1.3.1

References

Frequently Asked Questions

What is CVE-2026-54785?
CVE-2026-54785 is a security vulnerability in Gemini bridge involving gemini-bridge vulnerable to arbitrary local file read via consult_gemini_with_files inline mode under CWE-200: Exposure of Sensitive Information to an Unauthorized Actor.
Which Gemini bridge versions are affected?
Affected versions include releases prior to 1.3.1 across affected packages: gemini-bridge.
What version fixes CVE-2026-54785?
Upgrading to 1.3.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is gemini-bridge affected?
Yes, gemini-bridge is affected in releases prior to 1.3.1. Upgrade your dependency to 1.3.1 or later.
What is the CVSS score of CVE-2026-54785?
CVE-2026-54785 has a CVSS v3.1 base score of 6.2 (MODERATE) with vector string CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2026-54785?
CVE-2026-54785 is classified under CWE-200: Exposure of Sensitive Information to an Unauthorized Actor (The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.).
How can I check PyPI dependencies for CVE-2026-54785?
Run the dependency tree command: 'pip show gemini-bridge'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-c5px-58j2-7fqp",
  "modified" : "2026-07-31T22:31:20Z",
  "published" : "2026-07-31T22:31:20Z",
  "aliases" : [ "CVE-2026-54785" ],
  "summary" : "gemini-bridge vulnerable to arbitrary local file read via consult_gemini_with_files inline mode",
  "details" : "### Summary\n`consult_gemini_with_files` in **inline mode** read any file path supplied in\nthe `files` argument without confining it to the working `directory`, then\nforwarded the contents to the Gemini CLI. Because the caller also controls\n`query`, the file contents are echoed back through the Gemini round-trip\n(and sent to Google), making this an arbitrary local file read.\n\n### Impact\nAn MCP client — or an LLM that has been prompt-injected into calling the tool —\ncan read **any file the server process can access** (SSH keys, cloud\ncredentials, `.env`, source) and have it disclosed via the tool response.\nNo code execution by itself.\n\n### Affected component\n- Tool: `consult_gemini_with_files(query, directory, files, …)`, `mode=\"inline\"`\n- Sink: `_read_file_for_inline` via `_prepare_inline_payload` in `src/mcp_server.py`\n- The `at_command` mode already confined paths; inline mode did not.\n\n### Root cause\n`_resolve_path` returned an out-of-root path while only nullifying the *display*\nname, and `_prepare_inline_payload` read the file regardless. Absolute paths,\n`..` traversal, and symlink escapes were all accepted.\n\n### Patch\nFixed in **1.3.1**. `_resolve_path` now resolves symlinks and confines via\n`Path.relative_to(root)`; inline mode skips any entry that resolves outside the\nworking directory (the same guard `at_command` already enforced).\n\n### Workarounds\nUpgrade to 1.3.1. Before upgrading, avoid `mode=\"inline\"` with untrusted\n`files` input, or run the server with a restricted-permission user.\n\n### Credit\nReported privately by Zhihao Zhang (WPI).",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "gemini-bridge"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.0.0"
      }, {
        "fixed" : "1.3.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/eLyiN/gemini-bridge/security/advisories/GHSA-c5px-58j2-7fqp"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/eLyiN/gemini-bridge/pull/9"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/eLyiN/gemini-bridge/commit/8f3b85afd02b692c4bc974b5176e12fb277ea801"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/eLyiN/gemini-bridge"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/eLyiN/gemini-bridge/releases/tag/v1.3.1"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-200", "CWE-22" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-07-31T22:31:20Z",
    "nvd_published_at" : null
  }
}