Skip to main content
Block #9

Microsoft Research Uncovers Vulnerability in AI Coding: The Risks of Prompt Injection

Artificial Intelligence

Microsoft Research Uncovers Vulnerability in AI Coding: The Risks of Prompt Injection

Microsoft researchers have discovered a vulnerability in Anthropic's Claude Code GitHub Action, which proved susceptible to manipulation via prompt injection.

Thijs Molenaar
microsoft onderzoek ontdekt kwetsbaarheid in ai coding de risicos van prompt injectie
3 min

Microsoft researchers have recently discovered a vulnerability in Anthropic's Claude Code GitHub Action, which proved susceptible to manipulation via so-called prompt injection attacks. In these scenarios, an attacker hides malicious instructions within GitHub issues, pull requests, or comments that the AI agent is tasked with reviewing. This provides bad actors with the opportunity to expose sensitive information from software development pipelines.

The impact of this vulnerability is significant: AI coding agents operating within CI/CD (Continuous Integration/Continuous Deployment) environments often have access to API keys, cloud credentials, and other sensitive data. This creates new security risks, and Microsoft has warned via a blog post that there is often insufficient protection against these threats.

Microsoft notes that the investigation into this vulnerability began after observing multiple prompt injection attempts in public repositories, where conversation topics and pull requests were influenced by the AI agent. This points to a growing problem within AI ecosystems, where ensuring the reliability of input remains a challenge.

A pull request on GitHub allows developers to propose changes to a code repository, which are then reviewed before being approved. While this system may enhance software development efficiency, it must also be critically examined from a security perspective.

Prompt injection attacks have recently emerged as one of the most significant security threats facing AI agents. In these attacks, the perpetrator hides instructions within various content formats, such as emails, documents, or even code comments, causing an AI system to follow the malicious instructions rather than the user's actual intent.

A pull request on GitHub allows developers to propose changes to a code repository, which are then reviewed before being approved.

Anthropic’s Claude Code, launched in October, is designed for software development tasks. Earlier this year, the tool came under fire after more than 500,000 lines of source code were accidentally leaked. This led to an extensive analysis by researchers and developers who examined the internal architecture of Claude Code.

According to Microsoft, attackers had the ability to use prompt injection attacks hidden in GitHub issues or pull requests to manipulate Claude Code. During their testing, the researchers created a GitHub workflow in which they hid malicious instructions behind a domain they controlled. In doing so, they managed to deceive Claude, granting it access to files containing sensitive credentials. This allows an attacker to reconstruct these credentials and exfiltrate them via issue comments, workflow logs, web requests, or shell commands.

Following the discovery of the vulnerability, Anthropic patched it on 5 May. The update, version 2.1.128 of Claude Code, reflects the duration of this vulnerability and the need for constant vigilance in evolving AI landscapes. Microsoft emphasizes that despite various layers of protection in the software, a determined attacker is still capable of leaking sensitive information.

“We are entering an era where natural language acts as executable code. Untrusted input, such as GitHub issues, should be considered hostile by default,” says Microsoft. This illustrates the fragile balance between development usability and necessary security in a world where every action can potentially lead to risks.

Live koers MicrosoftOverview of the largest listed companiesView
  • AI
  • microsoft
Thijs Molenaar

Written by

Thijs Molenaar

Investment Editor · The Hague (NL)

Expertise

InvestingStocksAI companies

Thijs writes about stocks, index funds, and the cross-pollination between stock markets and crypto. He dissects quarterly figures from AI and chip companies and what they mean for investors.

Stay in the loop

Follow Block #9.

Block #9 Pro

More depth, less noise

€ 15 / month

See Pro

Practice without real money or test your knowledge?

Read more

Other interesting articles

All articles
Block Notes

By 7 a.m. you already know

Monday, Wednesday and Friday the news that matters. Sunday morning the whole week in one overview. No hype, no noise.

  • Monday, Wednesday, Friday and Sunday morning at 07:00
  • 2 min
  • No spam

Free. Unsubscribe in one click.