> status: mostly fine. patch anyway.practical AI security · est. 2026

Brief · Builders

One GitHub issue was a path to backdooring OpenAI's Codex package on npm

By alkizz ·

On Nov 11, the security firm Depi published how a single GitHub issue could have ended with a backdoored @openai/codex package on npm. That's the Codex CLI package, which npm counts at about 97 million downloads over the past month. The weak spot wasn't Codex CLI itself but a label bot in OpenAI's own repo: an Issue Labeler workflow handed every new issue's title and body to the Codex agent with allow-users: "*", so anyone who could open an issue could give it instructions. Depi says OpenAI "deployed a fix right away," and nothing malicious was published. There's no CVE, and OpenAI hasn't published its own account, so the chain below is Depi's.

How a label bot became a release problem

Depi's Pierre Martin and Garance de la Brosse wrote an issue that closed off the workflow's real prompt and started a new one, telling Codex it was a QA engineer who should run the diagnostic command in the issue. The command was compressed and encoded, which Depi says kept Codex's guardrails from recognizing what it did, and Codex ran it.

That put them inside Codex's sandbox, which blocks network access and process debugging and drops the workflow's tokens from its environment. But the GitHub runner's own .NET processes leave debug pipes in /tmp, and on Linux a pipe opens like a file, so the sandbox didn't stop them. Depi used those pipes to read the runner's memory, where the tokens still lived.

The rest is GitHub Actions plumbing. With a stolen token, Depi says an attacker could poison the build cache used by another workflow in the repo, one with write permissions that runs Python tests after restoring that cache. The planted test would create a fake Codex release, and when a maintainer deleted it, a booby-trapped workflow would hand the attacker an OpenID Connect token. Depi says that token could be traded for a signed token npm trusts, and that's enough to publish a malicious Codex version.

Depi showed the token theft in its own test environment and describes the final npm step without showing it run against OpenAI. It reported the chain through Bugcrowd with a full proof of concept, and Depi says OpenAI awarded an initial $1,000 bounty while the report is still under review. On Nov 11, the repo's labeler was changed to call OpenAI's API with tools disabled instead of running the Codex agent.

The sandbox escape is the clever part, but I think the first step is the one to remember. A bot holding secrets read text from strangers and treated it as instructions, and plenty of repos now run AI agents on issues and pull requests in exactly that setup. If you use Codex CLI, Depi says there's nothing to patch.

What to do

Sources

← All briefs