Skip to content
AI / LLM Write-up Advanced

Clinejection

A prompt injection flaw in Cline's AI issue-triage workflow let any GitHub user run arbitrary commands in a privileged workflow. Chained with GitHub Actions cache poisoning, this could steal nightly release tokens that also allowed publishing production releases to the VS Code Marketplace, OpenVSX and npm.

adnanthekhan.com

Published on adnanthekhan.com

Cline is an open-source AI coding tool that integrates with developer IDEs such as VSCode and its many forks. Users can download Cline through the VS Code Marketplace or OpenVSX.

Adnan Khan, on adnanthekhan.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the issue title was inserted directly into the AI agent's prompt while the agent had broad tool access including shell execution, and release workflows reused cache entries that any workflow could write.

Impact

An attacker could have stolen publication tokens and pushed a malicious update to millions of developers, though Cline's audit found no unauthorised releases during the exposure window and the tokens were later rotated.

What the attacker needed

A free GitHub account; ability to open an issue on the repository; nightly publish workflow runs on schedule

The fix

The issue triage workflow was removed, actions/cache was removed from publish workflows, and publication credentials were rotated.

How it was found

  1. Open a GitHub issue whose title contains instructions for the AI agent.
  2. The triage workflow passes the title to Claude, which runs a package install command.
  3. The installed package's preinstall script executes attacker code in the workflow.
  4. Flood the repository cache with junk data to force eviction of legitimate entries.
  5. Write poisoned cache entries matching the nightly publish workflow's keys.
  6. Wait for the nightly publish workflow to run and load the poisoned cache, exposing release tokens.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

Cline is a coding assistant extension for code editors. Its maintainers added a bot that reads new bug reports and acts on them automatically. Because the bot trusted the text of a report title, someone could hide instructions in that title and make the bot run commands, which could then reach the systems that publish the extension to users.

What is AI / LLM?

Prompt injection, data exfiltration and tool abuse in features built on language models, and the ordinary bugs around them.

Similar reports

View all

Same bug class and techniques, clearest first.

AI and LLM vulnerabilities

The lesson behind this report.

Prompt injection, data exfiltration and tool abuse in features built on language models, and the ordinary bugs around them.