# Cline ("Clinejection"): a GitHub issue prompt injection stole NPM_RELEASE_TOKEN and shipped cline@2.3.0

- **Canonical URL:** https://breachidents.com/incidents/cline-feb-2026-clinejection-npm
- **Organization:** Cline
- **Incident date:** Feb 17, 2026
- **Disclosed / updated:** Feb 17, 2026
- **Category:** CI supply chain
- **Primary source:** Cline Security Advisory (GHSA-9ppg-jx86-fqw7) and Adnan Khan (https://github.com/cline/cline/security/advisories/GHSA-9ppg-jx86-fqw7)

## In 30 seconds

- **How they got in:** Malicious GitHub issue title hijacked Cline’s Claude triage workflow, poisoned Actions cache, and leaked NPM_RELEASE_TOKEN during nightly release _[Confirmed]_
- **What leaked / reached:** Cline GitHub Actions cache, nightly release NPM_RELEASE_TOKEN, and cline@2.3.0 on npm (adding postinstall "npm install -g openclaw@latest" while leaving dist/cli.mjs unchanged)
- **What stayed safe:** Cline VS Code extension, JetBrains plugin, dist/cli.mjs CLI binary, and user source code (no exfiltration payload found in openclaw)

## Summary

On February 17, 2026, an unauthorized party published cline@2.3.0 to npm with a single added postinstall line that globally installed openclaw@latest for roughly eight hours (~4,000 downloads). Researcher Adnan Khan had demonstrated the root cause ("Clinejection") days earlier on a mirror repo: prompt-injecting Cline’s automated Claude GitHub issue triager let an attacker poison the Actions cache read by the nightly release workflow and steal NPM_RELEASE_TOKEN. Cline’s VS Code and JetBrains extensions were untouched.

## Attack sequence

1. **Feb 9–17, 2026 — Untrusted GitHub issue title hijacks Claude triage bot in GitHub Actions:** An opportunistic actor replicates the Clinejection PoC on cline/cline, feeding a prompt injection inside a GitHub issue title to the automated Claude triage workflow.
2. **Feb 17, 2026 — Compromised triage job poisons Actions cache read by nightly release workflow:** Shell commands run by the hijacked AI triage bot poison the shared GitHub Actions cache; the subsequent nightly release workflow loads it and leaks NPM_RELEASE_TOKEN.
3. **Feb 17, 03:26–11:30 PT — Unauthorized cline@2.3.0 installs openclaw globally before v2.4.0 and OIDC fix:** Between 03:26 AM and 11:30 AM PT, cline@2.3.0 triggers npm install -g openclaw@latest on roughly 4,000 machines until Cline revokes the token, ships v2.4.0, and enables OIDC.

## How they got in

"Clinejection" was the first real-world software supply-chain compromise kicked off by prompt-injecting an AI agent running inside CI.

On February 9, 2026, security researcher Adnan Khan published a proof-of-concept he had tested strictly on a mirror of the Cline repository. Cline ran an automated GitHub Actions workflow that fed incoming GitHub issues to Claude for triage, with shell-capable tooling enabled. An attacker could slip prompt-injection instructions into an ordinary GitHub issue title, trick the AI triage bot into executing commands, and poison the GitHub Actions cache.

Before the pipeline was fully locked down, a separate, opportunistic actor found Khan's public PoC on his test repository and fired it directly at `cline/cline`. When Cline's privileged nightly release workflow later ran and restored the poisoned cache, it leaked `NPM_RELEASE_TOKEN`.

## What it reached

At 03:26 AM PT on February 17, 2026, the attacker used the stolen token to publish `cline@2.3.0` to npm. Only one file differed from clean `cline@2.2.3`: `package.json` now carried `"postinstall": "npm install -g openclaw@latest"`, silently installing an unrelated open-source AI agent framework globally on roughly 4,000 developer machines during an eight-hour window.

Once community developers spotted the unauthorized hook, Cline revoked the leaked token, published clean `cline@2.4.0` at 11:23 AM PT, deprecated `2.3.0` at 11:30 AM PT, removed the vulnerable AI triage workflows, and moved npm publishing to GitHub Actions OIDC provenance.

## What stayed safe

The blast stopped at the npm CLI wrapper. Cline confirmed `dist/cli.mjs` inside `2.3.0` was byte-for-byte identical to `2.2.3`, no user source code was exfiltrated, and Cline's flagship VS Code extension and JetBrains plugin were published through completely separate channels and stayed clean.

## How to defend against this

- **Sandbox AI CI bots** (Stops step 1): Never grant shell execution, file writes, or cache-write access to LLM workflows that read untrusted GitHub issues, comments, or PR titles.
- **Isolate release caches** (Stops step 2): Keep release and publish workflows strictly separated from PR or issue-triage caches so a low-trust automation job can never poison a privileged release build.
- **Use npm OIDC provenance** (Stops step 3): Replace static NPM_RELEASE_TOKEN secrets with short-lived GitHub Actions OIDC Trusted Publishing gated by protected release environments.

## Evidence log

| Section | Claim | Evidence state | Source |
| --- | --- | --- | --- |
| How they got in | Researcher Adnan Khan demonstrated prompt injection against Cline’s Claude issue-triage workflow on a private mirror (Feb 9); a separate actor copied the PoC against cline/cline to poison the Actions cache and steal NPM_RELEASE_TOKEN | Confirmed | Adnan Khan Clinejection postmortem and Cline response |
| What it reached | At 03:26 AM PT on February 17, 2026, an unauthorized party published cline@2.3.0 adding "postinstall": "npm install -g openclaw@latest", live until deprecation at 11:30 AM PT (~4,000 downloads) | Confirmed | Cline Security Advisory GHSA-9ppg-jx86-fqw7, Feb 17, 2026 |
| What held | The CLI binary dist/cli.mjs was identical to clean v2.2.3, openclaw itself is an unrelated legitimate open-source package, and Cline’s VS Code and JetBrains extensions were unaffected | Confirmed | Cline Security Advisory GHSA-9ppg-jx86-fqw7, Feb 17, 2026 |

## Indicators of compromise

- **Package:** `cline@2.3.0 (npm)` (undefined)
- **Script:** `"postinstall": "npm install -g openclaw@latest"` (undefined)

---
Published by [breachidents](https://breachidents.com). Preserve evidence labels (Confirmed / Inferred / Withheld by vendor / Observed) when citing.
