Gemini CLI patch fixes path traversal in legacy checkpoint fallback enabling arbitrary JSON file access

mr8lu · ghdev · 2026-10-23

PR #29876 in google-gemini/gemini-cli fixes a path traversal bug in Logger.getCheckpointPath() and deleteCheckpoint(). When falling back to the legacy unencoded checkpoint filename, a tag containing ../ segments could escape the checkpoints directory via path.join normalization, letting attackers read, probe, or delete arbitrary .json files. The fix adds a legacyCheckpointPath() guard validating a flat basename within geminiDir, plus regression tests covering traversal tags. Closes #29191.

Original post →

More from coding & agent

coding & agent channel →