One GitHub Issue Could Have Backdoored OpenAI's Codex CLI on npm: Prompt Injection, Runner Memory Reads and Cache Poisoning Formed a Path to the Release Pipeline

Medium · 2026-11-14 · By H.A

One GitHub Issue Could Have Backdoored OpenAI's Codex CLI on npm: Prompt Injection, Runner Memory Reads and Cache Poisoning Formed a Path to the Release Pipeline

Researchers showed how an AI issue-labelling workflow in the openai/codex repository could be pushed from a public issue to stolen Actions tokens, a poisoned cache and npm trusted publishing; OpenAI fixed it and no malicious release is known.

Overview

Security researchers have shown how a single GitHub issue could have started a chain ending in a backdoored release of OpenAI's Codex CLI on npm, a package downloaded millions of times a month. The chain began with an AI-powered issue-labelling workflow in the openai/codex repository that put any issue's title and body straight into the Codex agent's prompt. From there it escaped the agent's sandbox, stole GitHub Actions tokens from runner memory, poisoned a build cache and set a trap for the release pipeline.

The researchers reported it through OpenAI's bug bounty programme with a full proof of concept. OpenAI deployed a fix straight away and paid an initial $1,000 bounty. There is no evidence a malicious release was ever published. The write-up was released on 11 November 2026.

The Vulnerability Chain

Timeline

All times are Mauritius time (UTC+4).

Tradecraft

This is a CI/CD supply-chain attack with an AI agent as the way in:

It follows a wider run of attacks on GitHub Actions secrets this month, but this chain needed no stolen account at all, just an issue.

Detection

For teams running AI agents or any untrusted-input workflow in GitHub Actions:

# Find workflows that feed issue/PR text to an agent or run on risky triggers
grep -rnE "issues:|issue_comment:|pull_request_target:" .github/workflows/
grep -rnE "allow-users:\s*\"?\*" .github/workflows/
grep -rnE "github\.event\.(issue|comment|pull_request)\.(title|body)" .github/workflows/

Recommended Actions

Analyst Assessment

OpenAI fixed this quickly, and nothing suggests it was exploited. The lesson is broader than one repository. Any project that adds an AI agent to issue triage effectively lets the public run code, and agent sandboxes are designed to stop the agent misbehaving, not to resist a determined attacker on a shared runner. The jump from a $0 issue to a possible npm release shows how short the gap between "helpful bot" and "supply-chain compromise" can be. Expect more research on agent-in-CI chains, and audit your own workflows now.

REEF SENTINEL