Web fraud attacks against coding agents exploit earned trust

The Long Con on the Web: Earn-then-Exploit Fraud Attacks against Coding Agents

Cryptography and Security

Summary

Coding agents that access the web and have high privileges can be tricked by malicious websites. This paper shows how bad websites first help these agents to build trust, and then exploit that trust to give harmful instructions. The authors tested their approach across many scenarios and found it works much better than earlier attacks. They also found coding agents tend to trust websites that previously helped them. To stop this, the authors propose a defense that separates trusted actions from privileged ones, making attacks ineffective without harming performance.

What this means in practice

  • For software security engineers: Design defenses that separate web-derived instructions from privileged operations to block fraud attacks on coding agents.
  • For devops teams: Configure coding agents with action-authorization separation to maintain task success while preventing web-based exploitation.

Authors

Xingling Xu, Zhengwei Jiang, Zheng Zhi, Fangming Dong, LingJia Guo, Wei Dong, Chunyan Ma, Jun Jiang

Abstract

Coding agents increasingly operate with web access and high privileges, creating a new attack surface where web fraud can directly target autonomous agents. Existing studies mainly focus on malicious links, prompt injection, and interface deception, while content-level web fraud against agents and the amplification of attacks through agent trust remain underexplored. In this paper, we present EtE (Earn-then-Exploit), a web fraud attack framework against coding agents, in which a malicious website first provides multiple rounds of genuinely verifiable assistance to establish trust and then introduces task-related instructions that cross intended operational boundaries. To systematically evaluate its effectiveness, we construct 56 organizational environments (8 task contexts x 7 attack consequences) and evaluate three representative coding agents. EtE achieves an average scene-level attack success rate of 71.4%, including 85.7% on Codex-GPT-5.5, 67.9% on ZCode-GLM-5.3-Flash, and 60.7% on QwenCode-Qwen3.7-Plus, significantly outperforming all injection-based baselines. More importantly, our experiments reveal that coding agents exhibit trust-like behavioral reliance on previously helpful Web sources, and that such accumulated credibility significantly increases their susceptibility to subsequent malicious instructions. Based on this finding, we propose action-authorization separation (AAS), which prevents web content from directly authorizing privileged actions and reduces the attack success rate to 0% while preserving 100% task completion, outperforming all evaluated defense baselines.