Why OpenAI replaced certificates after signed malicious packages
The TanStack npm incident reached OpenAI Codex and ChatGPT Desktop certificate rotation, showing how AI development tools now inherit supply-chain trust risk.
- What happened: Attackers published 84 malicious npm versions across 42
@tanstack/*Router and Start packages for roughly six minutes.- OpenAI said two employee devices were affected and, as a precaution, it is replacing macOS signing certificates for ChatGPT Desktop, Codex App, Codex CLI, and Atlas.
- The blind spot: This was not a long-lived npm token theft. The chain linked
pull_request_target, Actions cache poisoning, and OIDC token extraction. - Why builders should care: Provenance and SLSA did not prevent signed malicious releases. AI coding tools have to earn trust from the install chain upward.
- Watch: macOS users of OpenAI apps need current builds before June 12, 2026, and teams should review lockfiles plus credential rotation.
The TanStack npm supply-chain incident has turned into an OpenAI developer-tool update story. The first visible blast radius was a set of popular frontend packages. The second was a certificate rotation for OpenAI's macOS apps, including ChatGPT Desktop, Codex App, Codex CLI, and Atlas. That makes this more than another "npm package was compromised" security note. In an era where coding agents operate near local repositories, terminals, browsers, internal tools, and cloud credentials, the package install path is becoming part of the trust boundary for AI products.
OpenAI wrote in its May 13, 2026 incident response that two employee devices were affected by the TanStack npm supply-chain attack. According to OpenAI, attackers exfiltrated limited credential material from some internal source repositories. The company said it found no evidence of customer data access, production system access, intellectual property exfiltration, or tampering with shipped software. Still, OpenAI decided to replace the affected signing certificates because the impacted repositories included iOS, macOS, and Windows product-signing material. Even when the observed damage looks narrow, code-signing trust cannot be treated as a narrow issue.
The certificate rotation target is the key detail for AI developers. OpenAI named ChatGPT Desktop, Codex App, Codex CLI, and Atlas on macOS. Users need to update to current versions, and older macOS apps may stop working after June 12, 2026. iOS and Windows apps are handled through automatic updates. This matters because Codex CLI and desktop AI tools are no longer simple chat clients. They read local projects, edit code, run commands, and often work close to authenticated developer sessions. If the signing certificate chain is put under question, model quality is almost beside the point. The product trust boundary has moved below the model.
TanStack's own explanation makes the structure of the attack clearer. In its postmortem and the GitHub security advisory, TanStack says 84 malicious versions were published across 42 @tanstack/* packages between 19:20 and 19:26 UTC on May 11, 2026. On the clock, that is only six minutes. But those six minutes were enough for malicious versions to go out through the legitimate GitHub Actions OIDC trusted-publisher binding and carry npm provenance. This was not an attacker finding an old npm token and quietly publishing from the side. The uncomfortable part is that a modern release setup was used through the normal path after the workflow boundary was compromised.
@tanstack/* packagesThe attack chain started with pull_request_target. That GitHub Actions event is powerful and risky in open-source projects because it can run in a context closer to the base repository than a normal pull_request workflow. TanStack said this setup blurred the boundary between an external pull request and the base branch, allowing the attacker to poison the GitHub Actions cache. The next step was the runner process. The attacker waited for the publish job to obtain an OIDC token, extracted that token from memory, and used it for npm trusted publishing. The publish workflow file itself did not need to be changed. The malicious packages went out through the normal publish route.
That is the central lesson. Many teams understand npm trusted publishing as a major improvement because it removes long-lived npm tokens and uses short-lived identity tokens between GitHub Actions and npm. That direction is correct. SLSA provenance is also useful because it helps show where a build came from. But this incident shows that those controls do not fix workflow logic mistakes on their own. If malicious code is produced by a trusted pipeline and published with a trusted identity, provenance can only say that the build really came from that pipeline. It cannot prove that the pipeline was not tricked.
External PR and pull_request_target workflow
GitHub Actions cache poisoning bypasses the base/fork boundary
OIDC token extracted from publish-job runner memory
Malicious versions published through npm trusted publisher
OpenAI employee devices affected, macOS signing certificates rotated
The payload looked like a conventional credential stealer. The GitHub advisory refers to an obfuscated JavaScript file of roughly 2.3 MB, router_init.js, executed during install. It searched for credentials commonly present in developer and CI environments, including AWS, GCP, Kubernetes, Vault, npm, GitHub, and SSH material, then attempted to upload the results through an external network path. OpenAI's phrase "limited credential material" sits in that same pattern. The attacker did not have to trick a model. The attacker inspected the environment where development tools run. While AI security discussion often centers on prompt injection and jailbreaks, real incidents still frequently break through package installation and credential hygiene.
TanStack's response was relatively fast. An outside researcher opened an issue with technical analysis shortly after the publishing window, and Socket.dev contact helped trigger the incident room. TanStack removed the malicious versions and limited the affected scope to the Router and Start family. In a May 15 follow-up, TanStack said other repositories, including Query, DB, Store, AI, Table, and Form, were not affected and moved the incident to all-clear status. It also described hardening work around removing or reducing pull_request_target, tightening GitHub Actions cache use, and strengthening release workflows.
OpenAI's response follows a similar operational pattern. The company revoked affected credentials, limited personal access token usage, and said it strengthened package-manager settings such as minimum release age. It also pointed to continued dependency-protection work after an Axios-related supply-chain incident. That matters in practice because OpenAI, despite being an AI model company, does not live outside the npm ecosystem. Internal tools, frontend code, desktop apps, docs, test environments, and developer workstations all sit on top of the same open-source supply chain as everyone else. AI companies share ordinary software-supply-chain risk.
Community reaction was technically sober. Reddit discussions across JavaScript, Node, React, and netsec communities broadly credited TanStack for a fast and transparent postmortem. At the same time, the phrase "malicious packages with provenance" kept appearing. It is a blunt phrase, but it captures the issue. Developers should not treat provenance as a universal shield. Provenance proves one point in a chain. If the attacker has already compromised the CI workflow or runner context before that point, the proof can end up putting a trust stamp on the attacker's artifact.
This is AI news not only because OpenAI appears in the incident. It matters because AI coding tools change the meaning of a supply-chain incident. In the past, npm compromises were mainly framed as build-server, web-app, and deployment-artifact problems. Now local coding agents can run dependency installs, tests, browser automation, and Git operations on developer laptops. An agent executing pnpm install, updating dependencies, or editing CI configuration is not a rare experiment anymore. In that setting, a malicious package does not merely enter application code. It can land near the local credentials and engineering workflows that the agent itself can reach.
Codex CLI and similar tools have especially delicate trust boundaries. A user may type "fix this bug," but the real sequence can involve reading local files, installing packages, running tests, and preparing a Git diff. Once the tool ships as a signed app and the user grants it authority, the signing certificate is the first public promise the product makes. That is why OpenAI rotated certificates even without evidence that shipped software had been tampered with. If signing material may have been reachable in an impacted source repository, future distribution trust has to be rebuilt.
Development teams should check four things now. First, check lockfiles. Around May 11, 2026, see whether @tanstack/router, @tanstack/start, or related @tanstack/* packages resolved to malicious versions. Second, check install and CI logs. Any environment that installed malicious versions should be reviewed for network egress and credential access at package-install time. Third, rotate credentials conservatively if npm, GitHub, cloud-provider, Kubernetes, Vault, or SSH tokens were present in the same environment. Fourth, review CI workflows. Any pull_request_target workflow that checks out external PR code, trusts cache keys, or approaches publish permissions deserves close attention.
| Check | Why it matters | Lesson from this incident |
|---|---|---|
| Lockfile | A briefly published malicious version can persist in reproducible installs. | A six-minute incident can leave installation records that live much longer. |
| CI cache | Caches can become data channels across trust boundaries. | Cache sharing between fork and base contexts became part of the attack surface. |
| OIDC publishing | It reduces long-lived tokens, but it does not automatically defend a compromised runner. | The legitimate trusted-publisher path was used for malicious releases. |
| Code signing | It is the public signal users rely on when accepting app updates. | OpenAI rotated certificates as a precaution even without tampering evidence. |
AI teams have one more question to answer: how much package installation and release work should an agent be allowed to perform automatically? A blanket ban on install commands is not realistic. One of the useful parts of a coding agent is that it can add dependencies, run tests, reproduce failures, and keep working toward a fix. The more practical answer is to separate authority and observability. An agent may be able to change dependencies, but the path from an external PR context to publish permissions should be closed. An agent may be able to run local commands, but cloud credentials and code-signing material should not live in the same default workspace.
This incident does not end with "add more security tooling." TanStack already used 2FA, npm provenance, SLSA provenance, and OIDC trusted publishing. That does not mean nothing was wrong. It means teams have to look more precisely at the risks that remain after good controls are adopted. pull_request_target is useful for open-source maintainers. It can power labeling, commenting, previews, and automation on outside contributions. But when that convenience meets a publish path and a shared cache boundary, an attacker can turn privileged automation into their own tool.
The market angle is also changing. Supply-chain security vendors such as Socket, Snyk, StepSecurity, Wiz, and Aikido sell malicious-package detection, CI hardening, and dependency intelligence. AI development platforms such as OpenAI, Anthropic, GitHub, and Cursor focus on code generation and execution workflows. Those categories are no longer separate. Once an agent writes code and changes dependencies, the security scanner becomes part of the agent loop rather than a later compliance checkpoint. AI coding platforms are likely to treat package provenance, install policy, credential boundaries, and approval gates as default product UX.
OpenAI's disclosure quietly acknowledges that shift. The user-facing action is simple: update the app. The real message is broader. As AI development tools gain authority, teams cannot ask only whether model-generated code is safe. They also have to ask which packages the tool installs, which CI caches it trusts, when OIDC tokens are issued, and where signing material lives. If AI agents inherit the developer's hand, they also inherit the risks around that hand.
There is no need to overstate the incident. OpenAI says it found no evidence of customer data or production-system compromise, and TanStack narrowed the affected scope quickly. But it would be a mistake to minimize it. Malicious packages published for six minutes pushed a major AI company into certificate rotation. That one sentence is enough. A normally signed artifact can be malicious. Provenance can still be present when the workflow was tricked. The trust of an AI development tool can break first at npm install and GitHub Actions cache, long before anyone talks about model behavior.
The conclusion is straightforward. Supply-chain security is no longer background infrastructure for AI coding. A user's decision to update Codex or ChatGPT Desktop, an open-source maintainer's GitHub Actions configuration, a team's credential rotation, and a package manager's release-age policy are all part of the same story. The more work a model performs for developers, the stricter the install, signing, and release chain around that model has to become. TanStack's uncomfortable lesson is that the first trust problem for AI tools may not be answer quality. It may be the software supply chain under the tool.