Skip to the content
AI and Cybersecurity Learning and Practice Center Test automation Open the Learning Center

Is my AI tool safe?Coding agentsGoogle

Is Gemini CLI safe?

No tool is safe or unsafe on its own: it depends on what it can reach and how it is set up. The record for Gemini CLI: 3 incidents in this center's library and 0 CVEs in its advisory feed. Below: what went wrong, what was fixed, and how to use it safely.

What to watch for

A README prompt injection ran hidden commands in 2025; in 2026 the headless mode trusted the workspace automatically and an allowlist entry acted as a wildcard (GHSA-wpqr-6v78-jr5g, CVSS 10.0, fixed in 0.39.1; no CVE was assigned, so it is not in the count). It was deprecated by the time Plugin4Shell was disclosed, so that flaw stays open.

How to use it safely

Do not run it headless on untrusted repositories, keep allowlists explicit, and plan a migration if you depend on it, since deprecated tools stop getting fixes.

What it can reach

  • Reads attacker-controlled content
  • Runs commands with your permissions
  • Holds API keys and tokens
  • Installs plugins, skills or tools from registries

What went wrong: incidents in the library

How many people use it

A high CVE count can mean heavy scrutiny as much as weak engineering, so read the incidents and advisories, not only the number. The counts are what this center has recorded, not every flaw ever found; usage figures are the vendors' and registries' own published numbers.

Sources

Compare it with the others on the Technology watch list