← Back to feed

Depi Security Shows Prompt Injection Chain From GitHub Issue to Control of the @openai/codex npm Publish Pipeline

Date: 2026-11-12
Tags: supply-chain, prompt-injection, malicious-tool

Executive Summary

Depi Security disclosed an exploit chain that began with prompt injection through the OpenAI Codex GitHub Issue Labeler workflow and ended with the ability to publish to the official @openai/codex npm package. The chain combined code execution inside the agent sandbox, a sandbox escape, memory poisoning, a fake release, and abuse of an OpenID Connect token trusted by npm to reach release signing. OpenAI deployed a fix and awarded an initial $1,000 bounty; no customer side patch is required.

Campaign Summary

FieldDetail
Campaign / MalwareCodex GitHub Actions pipeline exploit chain
AttributionDepi Security (researchers), reported to OpenAI via Bugcrowd (confidence: high)
TargetOpenAI Codex development and publishing infrastructure; downstream @openai/codex npm consumers
VectorAttacker controlled GitHub issue title and body fed into the Codex agent prompt via the Issue Labeler workflow
Statusdisrupted
First Observed2026-11-11

Detailed Findings

According to Depi Security, the Issue Labeler GitHub Actions workflow defined in issue-labeler.yml uses openai/codex-action to analyze newly opened or codex-label tagged issues and suggest labels. Any external user can trigger the workflow by opening an issue, and the issue title and body are fed directly into the Codex prompt in the same natural language context as trusted instructions, enabling prompt injection. Depi Security reported one crafted prompt injection yielded code execution inside the agent sandbox, followed by a sandbox escape and memory poisoning that gave a path to the npm package. The chain then created a fake Codex release via the rust-ci.yml workflow; deleting the rogue release triggered a workflow that handed the attacker an OpenID token with write permissions. Depi Security stated the token could be exchanged for a signed JWT trusted by npm, allowing publication of a malicious Codex version. Depi Security reported the issue to OpenAI through Bugcrowd; OpenAI deployed a fix and awarded an initial $1,000 bounty with the report still under review. Depi Security stated there is nothing for defenders to patch on their side.

MITRE ATT&CK Mapping

TechniqueIDContext
Exploit Public-Facing ApplicationT1190External users trigger the issue-labeler workflow by opening GitHub issues, feeding attacker input into the agent prompt
Supply Chain CompromiseT1195.001Attacker path to publishing a malicious version of the @openai/codex npm package via a trusted npm JWT

IOCs

Domains

_No IOCs published. Depi Security disclosed the chain and PoC to OpenAI through Bugcrowd; affected workflow files and packages listed._

Full URL Paths

_No IOCs published. Depi Security disclosed the chain and PoC to OpenAI through Bugcrowd; affected workflow files and packages listed._

Splunk Format

_No IOCs available for Splunk query_

Affected Platforms

OpenAI Codex
@openai/codex npm package
GitHub Actions (issue-labeler.yml, rust-ci.yml)
openai/codex-action

Detection Recommendations

Audit GitHub Actions workflows that pass issue or PR content into AI agent prompts such as openai/codex-action and enforce least privilege on workflow GITHUB_TOKEN and OIDC permissions. Review OIDC trust policies for npm publishing so only expected workflows and environments can request publishing tokens, and monitor for unexpected releases, release deletions that trigger downstream workflows, and anomalous publish events for @openai/codex. Require human in the loop approval before any automated package publish step.

References