• Home
  • Cyber Crime
  • Cyber warfare
  • APT
  • Data Breach
  • Deep Web
  • Digital ID
  • Hacking
  • Hacktivism
  • Intelligence
  • Internet of Things
  • Laws and regulations
  • Malware
  • Mobile
  • Reports
  • Security
  • Social Networks
  • Terrorism
  • ICS-SCADA
  • POLICIES
  • Contact me
MUST READ

Europol shuts down Archetyp Market, longest-running dark web drug marketplace

 | 

Kelly Benefits data breach has impacted 550,000 people, and the situation continues to worsen as the investigation progresses

 | 

Cisco removed the backdoor account from its Unified Communications Manager

 | 

U.S. Sanctions Russia's Aeza Group for aiding crooks with bulletproof hosting

 | 

Qantas confirms customer data breach amid Scattered Spider attacks

 | 

CVE-2025-6554 is the fourth Chrome zero-day patched by Google in 2025

 | 

U.S. CISA adds TeleMessage TM SGNL flaws to its Known Exploited Vulnerabilities catalog

 | 

A sophisticated cyberattack hit the International Criminal Court

 | 

Esse Health data breach impacted 263,000 individuals

 | 

Europol dismantles €460M crypto scam targeting 5,000 victims worldwide

 | 

CISA and U.S. Agencies warn of ongoing Iranian cyber threats to critical infrastructure

 | 

U.S. CISA adds Citrix NetScaler flaw to its Known Exploited Vulnerabilities catalog

 | 

Canada bans Hikvision over national security concerns

 | 

Denmark moves to protect personal identity from deepfakes with new copyright law

 | 

Ahold Delhaize data breach affected over 2.2 Million individuals

 | 

Facebook wants access to your camera roll for AI photo edits

 | 

SECURITY AFFAIRS MALWARE NEWSLETTER ROUND 51

 | 

Security Affairs newsletter Round 530 by Pierluigi Paganini – INTERNATIONAL EDITION

 | 

The FBI warns that Scattered Spider is now targeting the airline sector

 | 

LapDogs: China-nexus hackers Hijack 1,000+ SOHO devices for espionage

 | 
  • Home
  • Cyber Crime
  • Cyber warfare
  • APT
  • Data Breach
  • Deep Web
  • Digital ID
  • Hacking
  • Hacktivism
  • Intelligence
  • Internet of Things
  • Laws and regulations
  • Malware
  • Mobile
  • Reports
  • Security
  • Social Networks
  • Terrorism
  • ICS-SCADA
  • POLICIES
  • Contact me
  • Home
  • Breaking News
  • Hacking
  • Rules File Backdoor: AI Code Editors exploited for silent supply chain attacks

Rules File Backdoor: AI Code Editors exploited for silent supply chain attacks

Pierluigi Paganini March 19, 2025

The Rules File Backdoor attack targets AI code editors like GitHub Copilot and Cursor, making them inject malicious code via a supply chain vulnerability.

Pillar Security researchers uncovered a dangerous new supply chain attack vector called ‘Rules File Backdoor.’ Threat actors could use the technique to silently compromise AI-generated code by injecting malicious code. The attack targets AI code editors like GitHub Copilot and Cursor.

The Rules File Backdoor attack exploits hidden Unicode and evasion tactics to trick AI code assistants into injecting undetectable malicious code, bypassing reviews.

“By exploiting hidden unicode characters and sophisticated evasion techniques in the model facing instruction payload, threat actors can manipulate the AI to insert malicious code that bypasses typical code reviews. This attack remains virtually invisible to developers and security teams, allowing malicious code to silently propagate through projects.” reads the report published by Pillar Security. ‍ “Unlike traditional code injection attacks that target specific vulnerabilities, “Rules File Backdoor” represents a significant risk by weaponizing the AI itself as an attack vector, effectively turning the developer’s most trusted assistant into an unwitting accomplice, potentially affecting millions of end users through compromised software.”

Rule files are configuration files that guide AI Agent behavior in code generation and modification, defining coding standards, project architecture, and best practices. They are stored in central repositories with broad team-wide or global access, widely adopted in open-source communities, and often trusted as harmless configuration data. However, they frequently bypass security scrutiny and are integrated into projects without proper validation.

The experts noted that AI coding assistants’ reliance on rule files creates a major attack surface. Hidden Unicode in shared rule files can inject vulnerabilities, bypassing security reviews.

The attack embeds deceptive prompts in rule files, tricking AI tools into generating code with security vulnerabilities or backdoors.

“attackers can exploit the AI’s contextual understanding by embedding carefully crafted prompts within seemingly benign rule files.” continues the report. “When developers initiate code generation, the poisoned rules subtly influence the AI to produce code containing security vulnerabilities or backdoors.”

The attack exploits contextual manipulation, Unicode obfuscation, semantic hijacking, and cross-agent vulnerabilities to alter AI-generated code. By embedding hidden instructions in rule files, threat actors can persistently influence AI coding assistants, injecting security flaws into projects. Once incorporated, these malicious rule files impact all future code generation, surviving project forking and enabling widespread supply chain attacks.

The researchers published a video PoC of the attack in a real environment, highlighting how AI-generated files can be poisoned via manipulated instruction files.

Video Player
https://45700826.fs1.hubspotusercontent-na1.net/hubfs/45700826/CursorPOC%20(1).mp4

Media error: Format(s) not supported or source(s) not found

Download File: https://45700826.fs1.hubspotusercontent-na1.net/hubfs/45700826/CursorPOC%20(1).mp4?_=1
00:00
00:00
00:00
Use Up/Down Arrow keys to increase or decrease volume.

Below is the timeline of the Responsible Disclosure:

Cursor

  • February 26, 2025: Initial responsible disclosure to Cursor
  • February 27, 2025: Cursor replied that they are investigating the issue
  • March 6, 2025: Cursor replied and determined that this risk falls under the users’ responsibility
  • March 7, 2025: Pillar provided more detailed information and demonstration of the vulnerability implications
  • March 8, 2025: Cursor maintained their initial position, stating it is not a vulnerability on their side

GitHub

  • March 12, 2025: GitHub replied and determined that users are responsible for reviewing and accepting suggestions generated by GitHub Copilot.
  • March 12, 2025: Initial responsible disclosure to GitHub

Follow me on Twitter: @securityaffairs and Facebook and Mastodon

Pierluigi Paganini

(SecurityAffairs – hacking, Rules File Backdoor)


facebook linkedin twitter

AI Copilot Hacking information security news IT Information Security Pierluigi Paganini Rules File Backdoor Security News supply chain attack

you might also like

Pierluigi Paganini July 03, 2025
Europol shuts down Archetyp Market, longest-running dark web drug marketplace
Read more
Pierluigi Paganini July 03, 2025
Kelly Benefits data breach has impacted 550,000 people, and the situation continues to worsen as the investigation progresses
Read more

leave a comment

newsletter

Subscribe to my email list and stay
up-to-date!

    recent articles

    Europol shuts down Archetyp Market, longest-running dark web drug marketplace

    Cyber Crime / July 03, 2025

    Kelly Benefits data breach has impacted 550,000 people, and the situation continues to worsen as the investigation progresses

    Uncategorized / July 03, 2025

    Cisco removed the backdoor account from its Unified Communications Manager

    Security / July 02, 2025

    U.S. Sanctions Russia's Aeza Group for aiding crooks with bulletproof hosting

    Cyber Crime / July 02, 2025

    Qantas confirms customer data breach amid Scattered Spider attacks

    Cyber Crime / July 02, 2025

    To contact me write an email to:

    Pierluigi Paganini :
    pierluigi.paganini@securityaffairs.co

    LEARN MORE

    QUICK LINKS

    • Home
    • Cyber Crime
    • Cyber warfare
    • APT
    • Data Breach
    • Deep Web
    • Digital ID
    • Hacking
    • Hacktivism
    • Intelligence
    • Internet of Things
    • Laws and regulations
    • Malware
    • Mobile
    • Reports
    • Security
    • Social Networks
    • Terrorism
    • ICS-SCADA
    • POLICIES
    • Contact me

    Copyright@securityaffairs 2024

    We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept All”, you consent to the use of ALL the cookies. However, you may visit "Cookie Settings" to provide a controlled consent.
    Cookie SettingsAccept All
    Manage consent

    Privacy Overview

    This website uses cookies to improve your experience while you navigate through the website. Out of these cookies, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities...
    Necessary
    Always Enabled
    Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
    Non-necessary
    Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.
    SAVE & ACCEPT