gemini-bridge
Affected
- introduced
1.0.0, fixed1.3.1(ecosystem)
Fixed versions
1.3.1
Fix
- Fixed version
1.3.1pip install --upgrade gemini-bridge==1.3.1
Advisory
Also known as: CVE-2026-54785, GHSA-c5px-58j2-7fqp
gemini-bridge vulnerable to arbitrary local file read via consult_gemini_with_files inline mode
Summaryconsult_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 controlsquery, 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
consult_gemini_with_files(query, directory, files, …), mode="inline"_read_file_for_inline via _prepare_inline_payload in src/mcp_server.pyat_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 viaPath.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 untrustedfiles input, or run the server with a restricted-permission user.
Credit
Reported privately by Zhihao Zhang (WPI).
Medium Basis: CVSS v3 score 6.2, vector CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
1.0.0, fixed 1.3.1 (ecosystem)1.3.1
1.3.1pip install --upgrade gemini-bridge==1.3.1Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: PyPA Advisory Database · CC BY 4.0