XOXO: Stealthy Cross-Origin Context Poisoning Attacks against AI Coding Assistants

要約

AIコーディングアシスタントは、コード生成などのタスクに広く使用されています。
これらのツールには、ファイル、プロジェクト、および貢献者$ \ unicode {x2014} $のさまざまな起源$ \ unicode {x2014} $から自動的に供給された大規模で複雑なコンテキストが必要になり、$ \ unicode {x2014} $基礎となるLLMに供給されるプロンプトの一部が形成されます。
この自動コンテキスト収集により、新しい脆弱性が導入され、攻撃者がアシスタントの出力を妥協するために微妙に入力できるようになり、脆弱なコードを生成したり、重大なエラーを導入したりできます。
私たちは、意味的に同等の敵対的なコードの修正に依存しているため、検出するのが難しい、新しい攻撃、オリジンクロスオリジンコンテキスト中毒(XOXO)を提案します。
従来のプログラム分析手法は、コードのセマンティクスが正しいままであり、合法的に見えるため、これらの摂動を特定するのに苦労しています。
これにより、攻撃者はコーディングアシスタントを操作して誤った出力を生成し、被害者開発者に責任をシフトします。
ケイリーグラフを使用して変換スペースを体系的に検索する新しいタスクに依存しないブラックボックス攻撃アルゴリズムGCGを導入し、一般的なAIコーディングアシスタントが使用するGPT 4.1およびClaude 3.5 Sonnet V2を含む5つのタスクと115モデルで平均75.72%の攻撃成功率を達成します。
さらに、敵対的な微調整のような防御は、私たちの攻撃に対して効果がなく、LLM駆動のコーディングツールでの新しいセキュリティ対策の必要性を強調しています。

要約(オリジナル)

AI coding assistants are widely used for tasks like code generation. These tools now require large and complex contexts, automatically sourced from various origins$\unicode{x2014}$across files, projects, and contributors$\unicode{x2014}$forming part of the prompt fed to underlying LLMs. This automatic context-gathering introduces new vulnerabilities, allowing attackers to subtly poison input to compromise the assistant’s outputs, potentially generating vulnerable code or introducing critical errors. We propose a novel attack, Cross-Origin Context Poisoning (XOXO), that is challenging to detect as it relies on adversarial code modifications that are semantically equivalent. Traditional program analysis techniques struggle to identify these perturbations since the semantics of the code remains correct, making it appear legitimate. This allows attackers to manipulate coding assistants into producing incorrect outputs, while shifting the blame to the victim developer. We introduce a novel, task-agnostic, black-box attack algorithm GCGS that systematically searches the transformation space using a Cayley Graph, achieving a 75.72% attack success rate on average across five tasks and eleven models, including GPT 4.1 and Claude 3.5 Sonnet v2 used by popular AI coding assistants. Furthermore, defenses like adversarial fine-tuning are ineffective against our attack, underscoring the need for new security measures in LLM-powered coding tools.

arxiv情報

著者 Adam Štorek,Mukur Gupta,Noopur Bhatt,Aditya Gupta,Janie Kim,Prashast Srivastava,Suman Jana
発行日 2025-05-20 05:55:59+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.CR, cs.LG, cs.SE パーマリンク