Claude Code Vulnerability May Let Attackers Steal Credentials From GitHub, Says Microsoft – Decrypt


In short

  • Microsoft researchers discovered that Anthropic’s Claude Code GitHub Motion could possibly be manipulated by means of immediate injection assaults.
  • The assault relied on malicious directions hidden in GitHub points, pull requests, or feedback that the AI agent was requested to evaluation.
  • Anthropic patched the vulnerability in Could after Microsoft disclosed the difficulty by means of HackerOne.

Microsoft researchers disclosed a now-patched vulnerability in Anthropic’s Claude Code GitHub Motion that might have allowed attackers to show credentials saved in software program improvement pipelines by manipulating the AI agent by means of malicious GitHub content material.

In a blog post on Friday, Microsoft warned that AI coding brokers working inside CI/CD workflows could create new safety dangers as a result of these environments typically have entry to API keys, cloud credentials, and different delicate info.

“We started this analysis after observing immediate injection makes an attempt in public repositories utilizing AI-assisted GitHub workflows throughout a number of distributors, the place attacker-controlled challenge or [pull requests], content material is processed by the AI agent and will affect its instrument use,” Microsoft wrote.

On GitHub, a pull request permits builders to suggest adjustments to a code repository and have these adjustments reviewed earlier than they’re authorised and merged.

The report comes as immediate injection assaults have emerged as one of many greatest safety threats dealing with AI brokers. In a immediate injection assault, an attacker hides directions in content material akin to emails, paperwork, web sites, or code feedback, inflicting an AI system to observe these directions as an alternative of the consumer’s.

Launched in October, Claude Code is Anthropic’s AI coding agent for software program improvement duties. The instrument drew scrutiny in March after Anthropic by accident leaked greater than 500,000 strains of its supply code, exposing particulars of its inside structure and prompting widespread evaluation by researchers and builders.

In accordance with Microsoft, attackers might use immediate injection assaults hidden in GitHub points, pull requests, or feedback to govern Claude Code into accessing information containing delicate credentials.

To check the vulnerability, Microsoft created a GitHub workflow and disguised malicious directions behind content material hosted on a site it managed, permitting the researchers to bypass Claude’s security protections. The immediate injection assault tricked Claude into studying delicate credentials and altering them to evade each Claude’s safeguards and GitHub’s secret-scanning instruments. Microsoft mentioned an attacker might then reconstruct the credential and exfiltrate it by means of challenge feedback, workflow logs, net requests, or shell instructions.

“To bypass Sonnet’s refusal security mechanisms, we obscured the shell payload behind a response from our managed area,” the agency mentioned. “We additionally enabled the workflow to be triggered by customers with no ‘write’ permissions to make sure Anthropic’s setting variables scrub mitigations have been energetic throughout our assessments.”

Anthropic patched the flaw on Could 5 with Claude Code model 2.1.128 after Microsoft disclosed the vulnerability by means of HackerOne on April 29.

Regardless of a number of layers of built-in safety controls, Microsoft discovered {that a} decided attacker might doubtlessly manipulate an AI agent into exposing delicate info.

“We’re getting into an period the place pure language is executable code, and untrusted inputs like GitHub points should be handled as hostile by default,” it mentioned. “A single, rigorously crafted remark mixed with a misunderstood belief boundary is all it takes to stroll away with manufacturing credentials.”

Day by day Debrief E-newsletter

Begin day by day with the highest information tales proper now, plus unique options, a podcast, movies and extra.