Summary
gemini-bridge vulnerable to arbitrary local file read via consultgeminiwith_files inline mode
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 controlsquery, the file contents are echoed back through the Gemini round-trip
(and sent to Google), making this an arbitrary local file read.
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.
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).
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.
Input manipulates file paths to reach files outside the intended directory, such as configuration or credential files. Typical impact: unauthorized file read or write outside the intended directory.
CVE-2026-54785 has a CVSS score of 6.2 (Medium). The vector is requires local access, no privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (1.3.1); upgrading removes the vulnerable code path.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Already deployed Kodem?
See it in your environmentNew to Kodem? Get a demo →Remediation advice
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).
Frequently Asked Questions
- What is CVE-2026-54785? CVE-2026-54785 is a medium-severity path traversal vulnerability in gemini-bridge (pip), affecting versions >= 1.0.0, < 1.3.1. It is fixed in 1.3.1. Input manipulates file paths to reach files outside the intended directory, such as configuration or credential files.
- How severe is CVE-2026-54785? CVE-2026-54785 has a CVSS score of 6.2 (Medium). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
- Which versions of gemini-bridge are affected by CVE-2026-54785? gemini-bridge (pip) versions >= 1.0.0, < 1.3.1 is affected.
- Is there a fix for CVE-2026-54785? Yes. CVE-2026-54785 is fixed in 1.3.1. Upgrade to this version or later.
- Is CVE-2026-54785 exploitable, and should I be worried? Whether CVE-2026-54785 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether CVE-2026-54785 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix CVE-2026-54785? Upgrade
gemini-bridgeto 1.3.1 or later.