Rule file prompt injection attacks on coding agents
Start here
Researchers propose PackHallu, a package hallucination attack against coding agents: the attacker injects malicious prompts into community-shared rule files (e.g., .cursorrules) to induce the coding agent to replace legitimate dependencies with attacker-controlled packages. To generate effective injection prompts, the authors propose the PackHallu evolutionary optimization framework, which uses trajectory-level feedback and LLM-guided mutations to iteratively rewrite injection content. Evaluations on multiple benchmarks, LLMs, and agent frameworks show that PackHallu achieves high attack success rates and strong transferability across different model and agent combinations.
Generated by AI from reports · Updated 2026-10-09
Related research
This event's paper
- Package Hallucination Attacks on Coding Agents through Prompt Injection in Rule Files
arXiv · 2026-10-07 · Deep reading
Progress timeline
- Paper TrackerResearchers propose PackHallu: package hallucination attacks on coding agents via rule file prompt injection
Researchers propose a package hallucination attack in which attackers inject malicious prompts into community-shared rule files (e.g., .cursorrules) to induce coding agents to replace legitimate dependencies with attacker-controlled packages. To generate effective injection prompts, the authors propose the PackHallu evolutionary optimization framework, which iteratively rewrites injection content using trajectory-level feedback and LLM-guided mutations. Evaluations across multiple benchmarks, LLMs, and agent frameworks show that PackHallu achieves high attack success rates and strong transferability across different model and agent combinations. The research concludes that coding agents are vulnerable to such attacks and that autonomous coding systems need stronger security protections.