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
- Large data centers employ only ~50-150 permanent on-site staff, Microsoft says — brezina · 2026-10-16
- Prediction: Opus 5.5-level models on laptops by 2027, backed by Qwen 27B data — cephaloform · 2026-10-16
- Oracle down 12% in a week, nearly 50% off June high as OpenAI exposure spooks market — alvelda · 2026-10-16
- US data center moratoriums top 400 — an AI bull explains why they're actually good for AI — kevinsxu · 2026-10-16
- Microsoft Research unveils Magnetar, the fastest zkVM at 10-39x speedups and post-quantum security — jedisct1 · 2026-10-16
- Bonsai 2 2B hits 120 tok/s on iPhone 18 Pro, outpaces Qwen 3.5 2B at half the memory — cephaloform · 2026-10-16