Critical Flaws in Claude Code and Gemini CLI Expose CI/CD Pipelines

Recent security assessments have uncovered significant vulnerabilities in Anthropic’s Claude Code and Google’s Gemini CLI, both integral to continuous integration and deployment (CI/CD) workflows. These flaws could allow unauthorized code execution and unauthorized access to sensitive information within development environments.

Claude Code Vulnerabilities

Claude Code, an AI-driven coding assistant, was found to have a critical flaw identified as CVE-2026-54316. This vulnerability enabled attackers to exploit the Hugging Face public download counter to exfiltrate API keys, leaking them one character at a time. The issue affected versions from 0.2.54 up to 2.1.163 and has been addressed in version 2.1.163. Exploitation required introducing untrusted content into a Claude Code context.

Additionally, a separate issue was discovered where Claude Code’s command validator improperly handled single-quoted text, allowing malicious payloads to bypass security checks and execute unintended commands. This flaw did not receive a CVE but underscores the importance of thorough input validation in development tools.

Gemini CLI Vulnerabilities

Google’s Gemini CLI, a command-line interface for AI model management, contained a severe vulnerability designated as CVE-2026-12537. This OS command injection flaw resided in the container launcher and could be exploited through a crafted .gemini/.env file. Attackers could execute arbitrary code on the host system of a headless CI platform before the sandbox environment initialized. The vulnerability affected versions prior to 0.39.1 and has been patched in Gemini CLI 0.39.1 and run-gemini-cli 0.1.22.

Another issue in Gemini CLI involved the tool allowlist, which was only parsed during tool registration. At runtime, there was no enforcement, and under the –yolo flag, every command requested by the model was auto-approved. Google addressed this and the container-launcher flaw in a comprehensive advisory, emphasizing the need for strict runtime enforcement of security policies.

These vulnerabilities highlight the critical need for rigorous security practices in the development and deployment of AI-driven tools. Developers and organizations must ensure that their CI/CD pipelines are updated to the latest versions of these tools to mitigate potential risks. Regular security audits and adherence to best practices in input validation and sandboxing are essential to safeguard against such vulnerabilities in the future.