Skip to main content
Mallory
← Back to News
ai-platform-securitybuild-pipeline-compromisepackage-repository-poisoningleaked-secret-api-key

Prompt Injection and Trojanized PyPI Package Exposed Secrets in AI Coding Tools

Emerging Technology Risk · 4 sources · Updated 5mo ago · First seen May 25, 2026

Prompt Injection and Trojanized PyPI Package Exposed Secrets in AI Coding Tools

Researchers from Johns Hopkins University showed that a "comment-and-control" prompt injection technique could hijack AI coding agents embedded in GitHub workflows, including Anthropic’s Claude Code Security Review, Google’s Gemini CLI Action, and GitHub Copilot Agent. By planting malicious instructions in untrusted GitHub content such as pull request titles, issue text, comments, and hidden HTML, the attackers made the agents follow attacker-controlled directions and exfiltrate secrets through workflow output or GitHub comments. The demonstrations reportedly exposed Anthropic and Gemini API keys, GitHub tokens, and other credentials available in GitHub Actions runners, and the affected vendors paid bug bounties and patched the issue without issuing CVEs or public advisories.

Separate research also identified a trojanized PyPI package, hermes-px, marketed as a privacy-focused AI proxy but designed to steal user prompts and exfiltrate data, including an altered Claude Code system prompt. Together, the findings show that the most immediate risk around AI developer tooling is not only the model itself but the runtime and integration layer, where untrusted repository content, overprivileged CI/CD workflows, and malicious third-party packages can turn coding assistants into secret-leaking supply-chain footholds. Defenders were urged to minimize agent permissions, restrict secret exposure, rotate credentials, prefer short-lived OIDC tokens, and harden GitHub Actions configurations such as pull_request_target usage.

Why it matters

Impact assessment

AI coding agents embedded in GitHub workflows and developers who install unvetted AI-related Python packages are directly affected. The highest-risk populations are software engineering, DevSecOps, and platform teams using GitHub Actions with AI agents that can access secrets, execute shell commands, or write back to GitHub.

Impact is severe because successful exploitation can expose API keys, GitHub tokens, and other CI/CD secrets, creating downstream supply-chain risk, repository compromise, and unauthorized access to cloud or development resources. The exposure is broad as a vulnerability class across AI agents operating in CI/CD runtimes, while the demonstrated exploitation in the wild is limited to researcher proof-of-concept activity; the vendors patched affected products quietly and no public incident victims were identified in the references.

Supporting facts

  • Affected products demonstrated in the research:
    • Anthropic Claude Code Security Review
    • Google Gemini CLI Action
    • GitHub Copilot Agent
  • Affected environments:
    • GitHub Actions workflows
    • Repositories using pull_request_target
    • Workflows exposing repository, organization, or API secrets to runners
  • Exposed data types demonstrated:
    • Anthropic API keys
    • Gemini API keys
    • GitHub tokens
    • Other secrets present in the GitHub Actions runner environment
  • Scope statement from the references:
    • The vulnerability class applies broadly to AI coding agents in CI/CD runtimes with secret access, not only the three named products.
    • Other GitHub-integrated agents for Slack, Jira, email, or deployment automation may be similarly exposed.
  • Supply-chain component:
    • The PyPI package hermes-px was identified as a trojanized package marketed as a privacy-focused AI proxy but designed to steal prompts and exfiltrate data, including an altered Claude Code system prompt.
  • Known exploitation status:
    • Research demonstrations showed successful secret exfiltration.
    • No CVEs or public advisories were issued for the patched agent issues.
    • No confirmed real-world victim incidents were cited in the provided references.
New surface, new adversariesTrack how attackers are adapting to this technology.
Track this risk
Event timeline

How this story unfolded

Events from the most recent confirmed update back to the earliest known activity.

5 events · Apr 5, 2026 – Apr 21, 2026
  1. Apr 21, 20267mo ago

    Further analysis frames AI agent runtime as a CI/CD supply-chain risk

    Subsequent reporting emphasized that the core weakness exposed by Comment and Control was in AI agent runtime and CI/CD integrations, especially workflows using pull_request_target, exposed runner secrets, and overly broad permissions. The analysis recommended reducing agent privileges, rotating credentials, using short-lived OIDC tokens, and hardening GitHub Actions settings.

  2. Apr 15, 20268mo ago

    Anthropic, Google, and GitHub quietly patch agent secret-leak issue

    After responsible disclosure of the Comment and Control attack, Anthropic, Google, and GitHub remediated the issue and paid bug bounties. According to the reporting, the vendors did not publish CVEs or formal public advisories about the fixes.

  3. Apr 15, 20268mo ago

    Johns Hopkins researchers demonstrate 'Comment and Control' against GitHub AI agents

    Researchers led by Aonan Guan showed that malicious instructions embedded in GitHub pull request titles, issue bodies, comments, and hidden HTML comments could hijack AI agents in GitHub workflows. The attack caused Anthropic's Claude Code Security Review, Google's Gemini CLI Action, and GitHub Copilot Agent to follow attacker-controlled instructions and leak secrets from the GitHub Actions environment.

  4. Apr 6, 20268mo ago

    Media report amplifies hermes-px prompt-stealing PyPI package findings

    A follow-up security news report highlighted the trojanized PyPI AI proxy campaign, describing how the package stole Claude prompts and exfiltrated data. This reflected broader public reporting of the malicious package after the initial research disclosure.

  5. Apr 5, 20268mo ago

    JFrog discloses trojanized PyPI package hermes-px targeting Claude users

    JFrog Security Research reported that the PyPI package hermes-px, presented as a privacy-focused AI proxy, was malicious and stole user prompts while containing an altered Claude Code system prompt. The disclosure identified the package as a supply-chain threat affecting AI tooling users who installed it from PyPI.

Linked entities

Related entities

Vulnerabilities, threat actors, malware, products, organizations, and breaches Mallory has linked to this story.

Open in app →

Organizations

2 linked
AnthropicGitHub
Do you run this?Follow how adversaries are adapting to this technology, and where it touches your stack today.
Track This Risk
Mallory platform

See the full picture, correlated to your attack surface.

This page covers what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which threat actors are using it right now, and what to deploy next.

Exposure mappingMap indicators from this story to your assets and identify affected systems in minutes.
Threat actor evidenceEvery observed campaign, victim, and pivot linked to actors named in this story.
Associated malwareMalware, exploits, and IOCs connected to the activity described here.
Detection signaturesYARA, Sigma, and Snort rules deployed to your SIEM as soon as they’re published.
Scheduled alertsGet matching new stories delivered to your team as they break, not the next morning.
AI threadsAsk questions about this story and take action on the answers.