gemini-bridge vulnerable to arbitrary local file read via consult_gemini_with_files inline mode
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_inlinevia_prepare_inline_payloadinsrc/mcp_server.py - The
at_commandmode 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).
Betroffene Software
Klicken Sie auf eine Technologie, um alle zugehörigen Schwachstellen anzuzeigen.
| Plattform | Paket | Anfällige Versionen | Behoben in |
|---|---|---|---|
| Python (PyPI) | gemini-bridge | >= 1.0.0, < 1.3.1 | 1.3.1 |
Verweise
- https://github.com/eLyiN/gemini-bridge/security/advisories/GHSA-c5px-58j2-7fqp
- https://github.com/eLyiN/gemini-bridge/pull/9
- https://github.com/eLyiN/gemini-bridge/commit/8f3b85afd02b692c4bc974b5176e12fb277ea801
- https://github.com/eLyiN/gemini-bridge
- https://github.com/eLyiN/gemini-bridge/releases/tag/v1.3.1
- https://pypi.org/project/gemini-bridge
- https://github.com/advisories/GHSA-c5px-58j2-7fqp
- https://nvd.nist.gov/vuln/detail/CVE-2026-54785
- CVSS-Vektor
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N- Schwäche (CWE)
CWE-200, CWE-22- Plattform
- Python (PyPI)
- Paket
gemini-bridge- Veröffentlicht
- 31.07.2026
- Aktualisiert
- 11.10.2026 14:19
Quellen und Lizenzen
OSV / GitHub Advisory Database - PYSEC-2026-3574 - PyPA Advisory Database; CC BY 4.0
OSV / GitHub Advisory Database - GHSA-c5px-58j2-7fqp - CC BY 4.0
Schwachstellenhistorie: gemini-bridge
Alle veröffentlichten Schwachstellen dieses Pakets (Python (PyPI)), neueste zuerst. Zeigt, ob es ein einmaliger Ausrutscher ist oder ein Paket, das man im Auge behalten muss.
Dies ist die einzige bekannte Schwachstelle dieses Pakets.
Erkennen Sie Schwachstellen in Ihrer Anwendung
Mit der DockRay-Integration und aktivierter Softwareinventarisierung prüft DockRay gemeldete Komponentenversionen auf bekannte Schwachstellen und benachrichtigt Sie über bestätigte Treffer. Die Abdeckung hängt von der unterstützten Technologie und den verfügbaren Meldungen ab.