Breakdown: a GitHub issue told OpenAI's Codex bot to run code, and the chain reached Codex's npm release
By Abbi Labs · Published 18 November 2026
Are your keys already public?
The Abbi Labs quick check tests your live, public site as an anonymous visitor: secret-looking keys in your JavaScript, exposed .env and .git files, Supabase tables readable with your public key. It can't read your GitHub workflows, so do the repo checks below yourself. No sign-up.
No app handy?
No sign-up. Read-only public-resource and protocol metadata checks. No model prompts or tool execution. Scan only sites you own or are allowed to test.
Run on every deploy or use from Cursor / Claude Code via MCP →
Weekly AI-app security checklist
One short email a week: a practical check for apps built with Supabase, Next.js and AI tools (RLS, leaked keys, headers and more). Unsubscribe anytime.
Plenty of us have added an AI bot to a GitHub repo. It labels new issues, reviews pull requests, or answers comments. It feels harmless, because all it does is read text. On 11 November 2026, the security firm Depi showed what that text can do. Anyone with a GitHub account could open an issue on OpenAI's own Codex repository, and the AI issue labeler would read the title and body as part of its prompt. Depi turned that into code execution, then into the runner's tokens, then into a poisoned build cache, and finally into a path to publishing the official @openai/codex package on npm. OpenAI fixed it the same day the write-up went out.
Everything below comes from Depi's write-up, the Bugcrowd disclosure, and OpenAI's fix in the public openai/codex repo. Where something isn't public, I say so.
What happened
- An AI labeler read issues from anyone. The repo's
issue-labeler.ymlworkflow ran whenever an issue was opened. It usedopenai/codex-actionto suggest labels, pasted the issue title and body straight into the prompt, and setallow-users: "*", so it wasn't limited to maintainers. - The issue became the instructions. Depi wrote an issue that looked like the end of the real prompt followed by a new set of instructions ("run the diagnostic command from the issue"). The command was an encoded script, so the agent ran it without seeing what it did. Depi's write-up shows the logs from its own test repository.
- The sandbox had a gap. The agent ran in a
workspace-writesandbox with no network. But the GitHub runner's own .NET processes leave debugging pipes in/tmp, which the sandbox could write to. Depi used them to read the runner's memory and pull outGITHUB_TOKENandACTIONS_RUNTIME_TOKEN. - The tokens worked from outside. Depi showed the token leak in its own test repository. It says those tokens stayed valid outside OpenAI's environment for as long as the workflow ran, and that GitHub still treated requests made with them as coming from OpenAI's repo.
- Then the build cache. Another workflow in the repo (
rust-ci.yml) restored a cache and then ran Python tests. Depi says the cache key could be worked out without any secrets, so a planted cache entry containing a malicious test file would run inside that more trusted workflow. - And a trap for the release. The last step was a fake release that, when a maintainer deleted it, would trigger a workflow allowed to request an OpenID Connect token. npm accepts that kind of token for trusted publishing, which is the path to shipping a tampered
@openai/codex.
The numbers
- One GitHub issue was the entry point. Opening one needs nothing more than a free GitHub account.
- Millions of downloads a month. That's how Depi describes
@openai/codex. The Bugcrowd listing puts it at roughly 10 million weekly npm downloads, spiking to 200 million. - $1,000 initial bounty from OpenAI, with the report still under review, per Depi. Depi points out OpenAI's policy lists up to $100,000 for critical findings.
- Same day fix. Depi published on 11 November 2026. OpenAI's fix was merged in the public repo on 11 November (UTC).
What's confirmed and what we don't know
- The fix. OpenAI replaced the agent in the labeler with a short Python script that calls the Responses API with tools turned off and a strict JSON schema, then checks the suggested labels against a known list before applying them. A labeler that can't run commands and can only answer in a fixed shape has very little to lose to a crafted issue.
- No bad release that we know of. Depi doesn't say any malicious version was published, and it says Codex users have nothing to patch. This was a research finding reported through Bugcrowd, not a live attack.
- The cache trick has been narrowed. Depi notes the cache technique no longer works for workflows triggered by events outsiders can influence, such as issue comments and
pull_request_target. - Not public: what else OpenAI changed beyond the labeler, and the final bounty decision.
How to check your own repo
Only check repos you own or are responsible for. This takes about ten minutes.
- Find every AI step in your workflows. Run this in the repo root:
If you used Cursor, Claude Code, Lovable or similar to set up CI, check this even if you don't remember adding an AI step.grep -rnE "codex-action|claude-code-action|copilot|openai|anthropic|gemini|allow-users|allowed_non_write_users" .github/workflows - Check what triggers it. For each hit, look at the
on:block.issues,issue_comment,pull_request_targetanddiscussioncan all be fired by strangers on a public repo. Then look for text they control going into the prompt:grep -rnE "github.event.(issue|comment|pull_request|discussion).(title|body)" .github/workflows - Check who's allowed. A wildcard such as
allow-users: "*"means anyone. Remove it, or list the exact people. The Codex action's default is people with write access, which is the safer place to be. - Check what the job can reach. Look at
permissions:and thesecrets.*used in the same job. A bot that reads issues should not sit next to deploy keys, npm tokens, cloud credentials orid-token: write.
Check the side strangers can already see
CI tokens are one way out. Keys shipped in your live site are another, and anyone can find those without writing a clever issue. Paste your URL and Abbi Labs checks what a signed-out visitor can see: secret-looking keys in your JavaScript, exposed .env and .git, open Supabase tables. Read-only.
How to fix it
- Give the bot no tools if it only needs to answer. That's exactly what OpenAI did. For labeling, summarizing or triage, call the model API directly, turn tools off, ask for strict JSON, and check the answer against a list of allowed values before you act on it. No shell, no file writes.
- Limit who can trigger it. Run AI steps only for collaborators, or only after a maintainer adds a label. Don't use wildcards for who's allowed to run the agent.
- Strip the job's permissions. Set the minimum at the top of the workflow and give the bot only what it needs:
permissions: contents: read issues: write # only if it has to label # no secrets.NPM_TOKEN, deploy keys or id-token: write in this job - Keep untrusted jobs away from release jobs. Publish from a separate workflow that only runs on tags or a protected branch, needs a human approval (a GitHub environment with required reviewers), and doesn't restore caches that other workflows can write to.
- Treat issue and PR text as untrusted input. Same rule as form input on your site. If you have to put it in a prompt, keep it clearly marked as data, and assume a determined person can still get the model to follow it. Your safety comes from what the agent can't do, not from the prompt.
- Add a short cooldown on agent CLI updates. Depi's advice: update fast, but not the second a release drops, especially for tools that auto-update and run with your credentials. A delay setting such as
minimumReleaseAgein pnpm or Renovate is one way to do that. - Rotate if in doubt. If an AI step that strangers could trigger ever shared a job with secrets, rotate those secrets. See secret keys in git history and service_role key exposed.
My take
No memory bug, no zero-day in GitHub. It started with a sentence in an issue that a bot was built to read. The labeler only needed to pick a few labels, but it had a shell and sat on a runner next to tokens that mattered. That's the pattern to look for in your own repo: an AI step that reads stranger-written text and can do more than reply. Cut its tools, cut its permissions, keep it away from anything that publishes, and that same issue just gets a label.
Sources
- Depi, Backdooring the next release of Codex through GitHub Action pipeline exploit chaining, 11 November 2026 (primary; the exploit chain, bounty and advice)
- Bugcrowd CrowdStream, Backdooring the next release of Codex through Github Action Pipeline exploit chaining (disclosure summary, download figure)
- OpenAI, Use the Responses API for issue label suggestions (#60897), openai/codex commit, 11 November 2026 UTC (the fix)
- OpenAI, codex-action security guidance (default: only people with write access; widen
allow-userswith caution)