{"id":"CVE-2026-54785","aliases":["CVE-2026-54785","GHSA-c5px-58j2-7fqp","PYSEC-2026-3574"],"related":[],"kind":"vulnerability","state":"published","title":"gemini-bridge vulnerable to arbitrary local file read via consult_gemini_with_files inline mode","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### 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).","format":"markdown","source":"ghsa"},{"lang":"es","text":"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.","source":"nvd"}],"published":"2026-07-31T22:31:04.190Z","modified":"2026-10-23T23:10:00.157Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","score":6.2,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","score":6.2,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","score":6.2,"rating":"MEDIUM"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","score":6.2,"rating":"MEDIUM"}],"cwes":["CWE-22","CWE-200"],"affected":[{"ranges":[{"version":">= 1.0.0, < 1.3.1","status":"affected"}],"vendor":"eLyiN","product":"gemini-bridge","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"1.0.0","status":"affected","fixed":"1.3.1"}],"ecosystem":"PyPI","package":"gemini-bridge","purl":"pkg:pypi/gemini-bridge","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"1.0.0","status":"affected","fixed":"1.3.1"}],"ecosystem":"PyPI","package":"gemini-bridge","purl":"pkg:pypi/gemini-bridge","source":"pysec"}],"references":[{"url":"https://github.com/eLyiN/gemini-bridge/security/advisories/GHSA-c5px-58j2-7fqp","tags":["web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/eLyiN/gemini-bridge/pull/9","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/eLyiN/gemini-bridge/commit/8f3b85afd02b692c4bc974b5176e12fb277ea801","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/eLyiN/gemini-bridge/releases/tag/v1.3.1","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/eLyiN/gemini-bridge","tags":["package"],"sources":["ghsa","pysec"]},{"url":"https://pypi.org/project/gemini-bridge","tags":["package"],"sources":["pysec"]},{"url":"https://github.com/advisories/GHSA-c5px-58j2-7fqp","tags":["advisory"],"sources":["pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-54785","tags":["advisory"],"sources":["pysec"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-08-03T16:24:57.651Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-54785","url":"https://www.cve.org/CVERecord?id=CVE-2026-54785","licence":"CVE Terms of Use","modified":"2026-08-03T16:26:53.194Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-c5px-58j2-7fqp","url":"https://github.com/advisories/GHSA-c5px-58j2-7fqp","licence":"CC-BY-4.0","modified":"2026-08-04T14:40:57.763Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-54785","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-54785","licence":"Public domain","modified":"2026-10-23T23:10:00.157Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-3574","url":"https://osv.dev/vulnerability/PYSEC-2026-3574","licence":"CC-BY-4.0","modified":"2026-08-04T14:30:16.463Z"}],"updatedAt":"2026-11-25T22:59:30.746Z","epss":{"score":0.00151,"percentile":0.04507,"date":"2026-12-01T12:00:22.000Z"}}