1. News
  2. Software & developer tools
  3. AI coding · Security
AI coding · Security2 min read

Hidden text in project files can trick AI coding helpers into stealing data

Attackers hide invisible commands in project files that AI coding assistants read on their own, and reported hijack rates run from 40% to 84%.

By the Dashline deskSource: homeland411.com
Hidden text in project files can trick AI coding helpers into stealing data
Photo: Sebastiaan ter Burg from Utrecht, The Netherlands, CC BY 2.0

Attackers are hiding secret instructions inside the small settings files that AI coding assistants read when a project opens. A person looking at the file sees blank space. The assistant reads the hidden text as orders. Those orders can make it run unauthorized commands on a computer and steal passwords or other secrets stored there.

What changed

AI coding tools such as Cursor, GitHub Copilot, Claude Code and OpenAI Codex learn about a project by reading files like .cursorrules, CLAUDE.md, copilot-instructions.md and AGENTS.md. The tools treat these files as trusted guidance. Attackers now plant hidden commands in them. Advisories from the Cloud Security Alliance and researchers tracking a set of flaws called IDEsaster confirm the threat. Poisoned files reportedly hijack assistants 40% to 84% of the time.

How the trick works

The hidden text uses special Unicode characters, which are invisible symbols that computers store but screens do not draw. Instructions can also sit in HTML comments. A developer sees nothing. The AI decodes the hidden text and follows it. Pillar Security researchers named one version the Rules File Backdoor. A poisoned rule can tell the assistant to hide warnings and quietly run scripts in the background.

The risk grows when a setting called Auto-Run is on. It lets the assistant run commands without asking first. The same goes for extra tools connected to the assistant. In those setups, simply asking the AI to summarize a downloaded project can be enough to trigger credential theft.

Why it slips past defenses

Security tools that scan code mostly check programs and package lists. Most pipelines skip .md and .cursorrules files because they count as plain documentation. Human reviewers reading a code change also see nothing odd. The audits behind IDEsaster found more than 30 separate flaws across major AI coding editors.

What to do

The article says teams can cut the risk with four controls. Only the first appears in the material provided: turn off Auto-Run or any setting that runs terminal commands without confirmation. Beyond that, a few habits follow from how the attack works.

  • Turn off Auto-Run and require approval for every command the assistant wants to run.
  • Be careful opening projects from strangers, especially before asking an AI to summarize them.
  • Treat rules files as code that needs review, even though they look like plain text.

What is not known yet

The material does not say how many real projects have been poisoned or who has been hit. The 40% to 84% figures are reported success rates, and the text provided does not explain how they were measured. The full list of four controls was also cut off.

The takeaway

If you use AI coding tools, turn off auto-run commands and be careful opening projects from strangers.

More articles

You should really read these.

Next step

Let’s talk