Gemini CLI Security Fix: Preventing Code Injection via Extension Environment Variables
amelidev · ghdev · 2026-08-18
A PR for Google Gemini CLI addresses a security vulnerability where extension updates could bypass user consent checks and inject unauthorized environment variables into spawned MCP server processes.
Fix Details:
- Consent Change Detection: Custom environment variables defined in the extension manifest are now included in the consent string. Modifying environment configs now correctly forces a consent verification dialog.
- Subprocess Sanitization: A set of blocked runtime-altering environment variables (e.g., NODEOPTIONS, PYTHONPATH) was introduced. Any key matching this set is ignored during the MCP server environment merge to block potential execution preload attacks.
The PR includes automated unit tests to verify the fixes.
More from Infra
- Air New Zealand to offer free Starlink Wi-Fi across entire fleet by end of 2028 — elonmusk · 2026-11-30
- From Scratch to Trained Video Model in 10 Minutes With Pure C++/CUDA — gandamu_ml · 2026-11-30
- Study: 603 data center restrictions in 445 US counties, all 42 ballot proposals rejected — huggingface · 2026-11-30
- Google Colab hands users a G4 Blackwell GPU, user reports — MickeySteamboat · 2026-11-30
- 19 GitHub Actions Runner Providers Benchmarked: Speed and Cost, Updated Weekly — DanielLockyer · 2026-11-30
- Learn Inference: An Interactive Guide to Serving Generative Models in Production — attentionmech · 2026-11-30