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

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-pxwas 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.
- The PyPI package
- 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.


