Skip to content
Misbehavior1 sourceFirst seen
Picture from the hiddenlayer.com article
Image: hiddenlayer.com

CopyPasta: a README comment that talks coding agents into spreading themselves like a virus

Ourtake

The license file was the hook. Nobody reads the license, and now the license reads the agent.

What happened

HiddenLayer researchers demonstrated the CopyPasta attack, a prompt injection hidden in a README comment that tricks AI coding assistants into copying the payload into new files and inserting arbitrary code. The researchers said Cursor, Windsurf, Kiro and Aider copied the attack, and the test payload was a relatively harmless line of Python code.

Source