Security Flaw in Cline Enables Malicious AI-Driven Code Execution
- •Unauthorized command execution via prompt injection in GitHub issue titles
- •Escalation through cache poisoning to steal NPM publishing credentials
- •Malicious software release published and retracted following successful exploit
A sophisticated security breach recently targeted Cline, an open-source coding assistant, demonstrating the dangers of integrating autonomous AI into software development workflows. The attack, dubbed "Clinejection," began with a simple prompt injection where a malicious command was hidden within a GitHub issue title.
Because the repository used an automated AI agent to triage issues with broad system permissions, the agent inadvertently executed the attacker’s instructions. This allowed the intruder to run arbitrary code within the GitHub Actions environment—the automated "conveyor belt" used to test and build software.
The exploit escalated through a clever "cache poisoning" technique. By flooding the system’s temporary storage (the cache) with junk data, the attacker forced the system to overwrite legitimate files with malicious ones. When the high-security release workflow ran later, it unknowingly pulled in this compromised data.
This chain of events allowed the attacker to steal secret keys used for publishing the software to the public. While the unauthorized release was quickly retracted, the incident serves as a stark warning about giving AI models direct access to system tools without robust safeguards.