Never feed issue titles, bodies or comments straight into an AI agent that runs inside a CI workflow with publishing access

A prompt injection in a GitHub issue opened a path to OpenAI's official Codex npm package · Security incident · Web · Depi · Nov 11, 2026

What happened

Security firm Depi wrote on 11 Nov 2026 that the openai/codex repo had an issue-labeler GitHub Actions workflow that passed the title and body of any newly opened issue straight into a Codex agent prompt. Anyone could open an issue, so Depi used a crafted prompt injection to get code execution inside the agent sandbox, then chained a sandbox escape and cache poisoning until it could control what got published to the real @openai/codex npm package. Depi reported it through Bugcrowd; it says OpenAI fixed the core bug right away and users have nothing to patch.

How to prevent it

Treat issue and PR text as untrusted input: don't put it in an agent prompt in a job that holds publishing tokens or shares caches with release jobs. Split triage bots from release pipelines, give them read-only permissions, and consider a short cooldown before auto-updating AI coding tools.

Fix prompt for your own AI tool

Copy this into your own AI tool (Cursor, Lovable, Claude Code, Bolt…). It's general guidance written by us. Review what the AI suggests before applying it.

Before I install anything my AI suggests in Codex, help me check it's safe. For the package, extension or MCP server [name]: 1) Check it's the official one (publisher, repo link, download count, how recently it was updated, typo-squatted names). 2) List what permissions or access it gets (files, network, env vars, email). 3) Tell me how to pin the version and review install scripts. 4) Check my project for packages with known security advisories, and tell me how to update them. Don't install or remove anything until I confirm.

Why this keeps happening: dependencies, plugins & mcp servers

AI tools suggest packages, editor extensions and MCP servers by name, and attackers publish look-alike or hijacked versions that steal keys or run code on install.

A quick checklist before you ship

More on this: every dependencies, plugins & mcp servers story and our related guide.

Tools involved

Codex stories, GitHub Actions stories, npm stories

Related stories

Source: original post on Web ↗. Summarised in our own words; numbers are as stated by the source. Browse all stories.

The Honest Build. Real stories, not hype.

Every week: real stories of what building with AI actually took, the one lesson worth keeping, and the security slip-ups to avoid. Free, unsubscribe anytime. Weekly, every Friday.