Claude Code, Gemini CLI, GitHub Copilot Agents Vulnerable to Prompt Injection via Comments
Security WeekArchived Apr 16, 2026✓ Full text saved
A researcher has disclosed the details of the AI attack method he has named ‘Comment and Control’. The post Claude Code, Gemini CLI, GitHub Copilot Agents Vulnerable to Prompt Injection via Comments appeared first on SecurityWeek .
Full text archived locally
✦ AI Summary· Claude Sonnet
A researcher has disclosed the details of a prompt injection attack method named ‘Comment and Control’, which has been found to work against several popular AI code security and automation tools.
The attack method was discovered by security engineer and vulnerability researcher Aonan Guan, with assistance from Johns Hopkins University researchers Zhengyu Liu and Gavin Zhong.
In a blog post published on Wednesday, Guan said the attack has been confirmed to work against several widely used AI agents: Anthropic’s Claude Code Security Review, Google’s Gemini CLI Action, and GitHub Copilot Agent.
The researchers found that AI agents associated with these tools on GitHub Actions can be hijacked using specially crafted GitHub comments, including PR titles, comments, and issue bodies.
In the case of Claude Code Security Review, designed for automated security reviews, the researchers showed how an attacker could use a specially crafted PR title to trick the AI agent into executing arbitrary commands, extracting credentials, and revealing them as a security finding or an entry in the GitHub Actions log.
For Gemini CLI Action, which acts as an autonomous agent for routine coding tasks, the researchers used an issue comment with a prompt-injection title, along with specially crafted issue comments, to bypass guardrails and obtain a full API key.
In the Comment and Control attack aimed at GitHub Copilot Agent, the experts leveraged an HTML comment, which hides the payload, to bypass environment filtering, scan for secrets, and bypass the network firewall.
The Comment and Control attack can pose a serious threat, as the attacker’s malicious prompt is automatically triggered by GitHub Actions workflows, without any action from the victim — except in the case of Copilot, where the attacker’s issue must be manually assigned to Copilot by the victim.
“The pattern likely applies to any AI agent that ingests untrusted GitHub data and has access to execution tools in the same runtime as production secrets — and beyond GitHub Actions, to any agent that processes untrusted input with access to tools and secrets: Slack bots, Jira agents, email agents, deployment automation. The injection surface changes, but the pattern is the same,” Guan explained.
The findings have been reported to Anthropic, Google, and GitHub, and all have confirmed them. Anthropic classified the issue as ‘critical’ and implemented some mitigations, awarding a $100 bug bounty to the researchers. Google paid out a $1,337 bug bounty.
GitHub awarded the researchers $500, saying that their work “sparked some great internal discussions”, but classified the security issue as a known architectural limitation.
“This is the first public cross-vendor demonstration of a single prompt injection pattern across three major AI agents. All three vulnerabilities follow the same pattern: untrusted GitHub data → AI agent processes it → agent executes commands → credentials exfiltrated through GitHub itself,” Guan said.
“The deeper issue is architectural: these AI agents are given powerful tools (bash execution, git push, API calls) and secrets (API keys, tokens) in the same runtime that processes untrusted user input. Even when multiple layers of defense exist — model-level, prompt-level, and GitHub’s additional three runtime layers — they can all be bypassed because the prompt injection here is not a bug; it is context that the agent is designed to process,” he added.
Related: ‘By Design’ Flaw in MCP Could Enable Widespread AI Supply Chain Attacks
Related: ‘Mythos-Ready’ Security: CSA Urges CISOs to Prepare for Accelerated AI Threats
Related: Apple Intelligence AI Guardrails Bypassed in New Attack
WRITTEN BY
Eduard Kovacs
Eduard Kovacs (@EduardKovacs) is senior managing editor at SecurityWeek. He worked as a high school IT teacher before starting a career in journalism in 2011. Eduard holds a bachelor’s degree in industrial informatics and a master’s degree in computer techniques applied in electrical engineering.
More from Eduard Kovacs
$10 Domain Could Have Handed Hackers 25k Endpoints, Including in OT and Gov Networks
ICS Patch Tuesday: 8 Industrial Giants Publish New Security Advisories
Microsoft Patches Exploited SharePoint Zero-Day and 160 Other Vulnerabilities
Adobe Patches 55 Vulnerabilities Across 11 Products
Europe’s Largest Gym Chain Says Data Breach Impacts 1 Million Members
Nightclub Giant RCI Hospitality Reports Data Breach
Booking.com Says Hackers Accessed User Information
OpenAI Impacted by North Korea-Linked Axios Supply Chain Hack
Latest News
Splunk Enterprise Update Patches Code Execution Vulnerability
Microsoft Paid Out $2.3 Million at Zero Day Quest 2026 Hacking Contest
NIST Prioritizes NVD Enrichment for CVEs in CISA KEV, Critical Software
Cisco Patches Critical Vulnerabilities in Webex, ISE
Ransomware Hits Automotive Data Expert Autovista
Sweden Blames Pro-Russian Group for Cyberattack Last Year on Its Energy Infrastructure
Exploited Vulnerability Exposes Nginx Servers to Hacking
Capsule Security Emerges From Stealth With $7 Million in Funding
Trending
Webinar: A Step-By-Step Approach To AI Governance
April 28, 2026
With "Shadow AI" usage becoming prevalent in organizations, learn how to balance the need for rapid experimentation with the rigorous controls required for enterprise-grade deployment.
Register
Virtual Event: Threat Detection And Incident Response Summit
May 20, 2026
Delve into big-picture strategies to reduce attack surfaces, improve patch management, conduct post-incident forensics, and tools and tricks needed in a modern organization.
Register
People on the Move
ThreatModeler has appointed Kevin Gallagher as Chief Executive Officer.
Thomas Bain has been appointed Chief Marketing Officer at Silent Push.
The United States Department of War appointed David Vaughn as Technical Advisor for Data Infrastructure.
More People On The Move
Expert Insights
The Hidden ROI Of Visibility: Better Decisions, Better Behavior, Better Security
Beyond monitoring and compliance, visibility acts as a powerful deterrent, shaping user behavior, improving collaboration, and enabling more accurate, data-driven security decisions. (Joshua Goldfarb)
The New Rules Of Engagement: Matching Agentic Attack Speed
The cybersecurity response to AI-enabled nation-state threats cannot be incremental. It must be architectural. (Nadir Izrael)
The Next Cybersecurity Crisis Isn’t Breaches—It’s Data You Can’t Trust
Data integrity shouldn’t be seen only through the prism of a technical concern but also as a leadership issue. (Steve Durbin)
Why Agentic AI Systems Need Better Governance – Lessons From OpenClaw
Agentic AI platforms are shifting from passive recommendation tools to autonomous action-takers with real system access, (Etay Maor)
The Human IOC: Why Security Professionals Struggle With Social Vetting
Applying SOC-level rigor to the rumors, politics, and 'human intel' can make or break a security team. (Joshua Goldfarb)
Flipboard
Reddit
Whatsapp
Email