Gemini CLI path traversal bug: crafted tag could delete files outside checkpoint dir
ManoharPaturi · ghdev · 2026-09-27
A PR (#29521) for google-gemini/gemini-cli fixes a path traversal vulnerability: getCheckpointPath and deleteCheckpoint built the legacy fallback path using the raw tag, and path.join normalizes .. segments away. A tag like x/../../secret could resolve to a file outside the checkpoint directory — /chat delete <tag> would unlink it, and checkpoint load would return its contents.
Fix: a new isInsideCheckpointDir helper ensures the legacy raw path is only used when it still resolves inside the checkpoint directory (path.resolve + prefix check), so traversal tags simply miss with normal ENOENT semantics. Applied at both legacy uses: the load/exists fallback and the backward-compat unlink. Flat legacy tags behave exactly as before. Same bug class as #28699 (a2a-server restore path); closes #29191. Regression tests included; logger suite passes 43/43.
More from coding & agent
- Baseten's Guide: Evaluate Open Models for Coding Agents on Your Own PRs — baseten · 2026-11-16
- Google Research open-sources PaperOrchestra, a multi-agent framework for writing AI papers — google-research · 2026-11-16
- ffmpeg-skill gives coding agents local video editing via 42 FFmpeg tools and MCP — kajisho5 · 2026-11-16
- Agents Now Reply to Slack Messages on Their Own, Resolving a Prod Incident Ghost-to-Ghost — iamrobotbear · 2026-11-16
- Engineer's Interview Prep Method: Use Claude to Find Which Answers Undersell Your AI Work — brandon_galang · 2026-11-16
- DeepSeek open-sources its app frontend "chat-demo", already at 3.9k stars — NielsRogge · 2026-11-16