6.2medium
gemini-bridge vulnerable to arbitrary local file read via consult_gemini_with_files inline mode
- Severity
- 6.2medium CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.15% (higher than 4% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-c5px-58j2-7fqpPYSEC-2026-3574
Description
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| eLyiN gemini-bridge | >= 1.0.0, < 1.3.1 | CVE List |
| gemini-bridge (PyPI) | from 1.0.0 before 1.3.1 | GitHub Advisory Database, PyPA Advisory Database |
All scores
| GitHub_M | 6.2medium CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
| GitHub | 6.2medium CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
| PyPA Advisory Database | 6.2medium CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
Classification
What each source says
CVE List
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.
GitHub Advisory Database
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).
NVD (es)
gemini-bridge es un ligero servidor MCP que conecta agentes de IA con la IA Gemini de Google a través de la CLI oficial. Desde la versión 1.0.0 hasta la 1.3.1, consult_gemini_with_files en modo en línea leía cualquier ruta de archivo proporcionada en el argumento files sin confinarla al directorio de trabajo, luego reenviaba el contenido a la CLI de Gemini. Debido a que el llamador también controla la consulta, el contenido del archivo es devuelto a través del viaje de ida y vuelta de Gemini (y enviado a Google), lo que convierte esto en una lectura arbitraria de archivos locales. Este problema está solucionado en la versión 1.3.1.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-54785 changed 2026-08-03 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-c5px-58j2-7fqp changed 2026-08-04 | CC-BY-4.0 |
| NVD | CVE-2026-54785 changed 2026-10-23 | Public domain |
| PyPA Advisory Database | PYSEC-2026-3574 changed 2026-08-04 | CC-BY-4.0 |