Gemini CLI extension loader PR blocks path traversal with strict boundary validation
diegogodinezr · ghdev · 2026-09-03
Another hardening PR (#29169) on google-gemini/gemini-cli focuses on path resolution and directory boundary validation in the extension loader.
- New validateContextFilePath() / resolveContextFilePaths() helpers normalize paths via path.resolve, reject absolute paths upfront (POSIX and Windows), filter .. and URL-encoded variants (%2e%2e), and verify targets stay within the extension root via isSubpath().
- Non-standard percent usage (e.g. 100%complete.md) that breaks decodeURIComponent is logged and loaded with the original filename rather than dropped.
- Fault-tolerant loading: invalid context files in gemini-extension. log a warning and are skipped instead of failing the whole extension; plan.directory gets the same boundary checks.
- gemini extensions validate reuses the shared validator for consistent behavior.
A solid template for defending extension/plugin systems against path traversal.
More from coding & agent
- Developer asks: is LangChain still worth it vs rolling your own agent harness? — curious_vii · 2026-09-03
- Inference Engineering Is Just a Recipe: vLLM/SGLang, Replicas, Cache-Aware Routing — GabGarrett · 2026-09-03
- Developer accidentally built an entire agent factory with Fable 5.1 — 0xkarasy · 2026-09-03
- Microsoft adds Fabric data agents to Foundry agents via Fabric IQ (preview) — adnan_hashmi · 2026-09-03
- Databricks pitches agent-native data infrastructure, Lakebase Postgres at VLDB 2026 — matei_zaharia · 2026-09-03
- doodlestein ships a comprehensive web app review skill after months of debugging — doodlestein · 2026-09-03