Skip to content
Depi·Indexed by this site · Originally published· Event →SelectedAttention49

Depi says Codex repository Actions exploit chain can lead to npm publish permissions; OpenAI has fixed it

Backdooring the next release of Codex through GitHub Action pipeline exploit chaining

AI summary

Security firm Depi disclosed an exploit chain in the openai/codex repository, starting from issue prompt injection, demonstrated code execution in its test repository, and said it could ultimately obtain credentials to publish a malicious version of the official @openai/codex npm package. The Issue Labeler workflow of openai/codex feeds issue titles and bodies, which any user can submit, directly into the Codex prompt; the attacker thereby executes arbitrary commands in the Codex sandbox, then reads the memory of the Runner.Worker process through an unauthenticated CoreCLR debugging pipe under /tmp/, stealing secrets such as GITHUB_TOKEN; then uses Adnan Khan's Cacheract tool to poison the rust-ci workflow cache, and combined with the release:delete vulnerability he discovered, Depi says it can request an npm-trusted signing JWT from GitHub. Depi submitted a complete proof of concept via Bugcrowd, and OpenAI has fixed it. The package is downloaded millions of times per month.

Why it was selected

From issue prompt injection step by step to obtaining npm publishing credentials, demonstrating that once an agent enters the CI pipeline, prompt injection can escalate into a software supply chain risk.

Read originaldepi.security