← All advisories
VV-011highSupply chain2025-03

“Rules File Backdoor”: hidden Unicode instructions in AI rules files

Pillar Security showed invisible Unicode characters in shared rules files (.cursorrules, .mdc) can steer Cursor and GitHub Copilot into writing backdoored code.

01.

What it is

Attackers encode instructions with zero-width joiners and bidirectional markers. They are invisible to humans, including in GitHub pull request review, but parsed by the AI.

02.

How to check

  1. Scan .md / .mdc / rules files for invisible Unicode (command below, or Pillar’s free Rule File Scanner).
03.

How to fix

  1. Treat AI rules/config files like code: review them, and block hidden Unicode in CI.
# Find zero-width and bidi control characters in rules files
grep -rnP "[\x{200B}-\x{200F}\x{202A}-\x{202E}\x{2066}-\x{2069}\x{FEFF}]" \
  .cursorrules .cursor/ --include=*.md --include=*.mdc
04.

Sources

More advisories for this tool
The weekly email

One email a week. Only what changed.

New advisories, CVEs and fixes for Lovable, Bolt, v0, Replit, Base44 and Cursor apps. No roundups of things you already read.

Free. The list is new, so the first issues go out once there are readers. Unsubscribe from any email in one click. We never sell or share addresses.