arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2511.05797cs.CRcs.AI
收藏

当人工智能遇上网络:第三方AI聊天机器人插件中的提示注入风险

When AI Meets the Web: Prompt Injection Risks in Third-Party AI Chatbot Plugins

University of California, Santa Barbara(加州大学圣巴bara分校)

Yigitcan Kaya, Anton Landerer, Stijn Pletinckx, Michelle Zimmermann, Christopher Kruegel, Giovanni Vigna

AI总结:

本文首次大规模研究超1万个网站使用的17个第三方聊天机器人插件,发现对话历史完整性缺失和第三方内容混入两类提示注入漏洞,并通过受控实验证明其可绕过LLM安全防护。

摘要:

提示注入攻击对大型语言模型(LLMs)构成严重威胁,此前的研究主要关注个人副驾驶(personal copilots)等前沿LLM应用。相比之下,更简单的LLM应用(如客服聊天机器人)在网络上广泛存在,但其安全态势和面对此类攻击的暴露程度仍鲜为人知。这些应用通常依赖第三方聊天机器人插件作为连接商业LLM API的中介,为非专业网站构建者提供直观的方式来定制聊天机器人行为。为填补这一空白,我们首次对超过10,000个公共网站所使用的17个第三方聊天机器人插件进行了大规模研究,揭示了实践中此前未知的提示注入风险。首先,其中8个插件(被8,000个网站使用)未能保证网站访问者与聊天机器人之间网络请求中传输的对话历史的完整性。这一疏忽放大了直接提示注入攻击的影响,使攻击者能够伪造对话历史(包括伪造的系统消息),将其引发非预期行为(如代码生成)的能力提升3到8倍。其次,15个插件提供了诸如网页抓取之类的工具,以利用网站特定内容丰富聊天机器人的上下文。然而,这些工具无法区分网站的可信内容(如产品描述)与不可信的第三方内容(如客户评论),从而引入了间接提示注入的风险。值得注意的是,我们发现约13%的电子商务网站已经将其聊天机器人暴露于第三方内容之中。我们通过基于真实世界观察的受控实验系统地评估了这两种漏洞,重点关注系统提示设计和底层LLM等因素。我们的研究结果表明,许多插件采用了不安全的做法,削弱了LLM内置的安全防护机制。

英文摘要:

Prompt injection attacks pose a critical threat to large language models (LLMs), with prior work focusing on cutting-edge LLM applications like personal copilots. In contrast, simpler LLM applications, such as customer service chatbots, are widespread on the web, yet their security posture and exposure to such attacks remain poorly understood. These applications often rely on third-party chatbot plugins that act as intermediaries to commercial LLM APIs, offering non-expert website builders intuitive ways to customize chatbot behaviors. To bridge this gap, we present the first large-scale study of 17 third-party chatbot plugins used by over 10,000 public websites, uncovering previously unknown prompt injection risks in practice. First, 8 of these plugins (used by 8,000 websites) fail to enforce the integrity of the conversation history transmitted in network requests between the website visitor and the chatbot. This oversight amplifies the impact of direct prompt injection attacks by allowing adversaries to forge conversation histories (including fake system messages), boosting their ability to elicit unintended behavior (e.g., code generation) by 3 to 8x. Second, 15 plugins offer tools, such as web-scraping, to enrich the chatbot's context with website-specific content. However, these tools do not distinguish the website's trusted content (e.g., product descriptions) from untrusted, third-party content (e.g., customer reviews), introducing a risk of indirect prompt injection. Notably, we found that ~13% of e-commerce websites have already exposed their chatbots to third-party content. We systematically evaluate both vulnerabilities through controlled experiments grounded in real-world observations, focusing on factors such as system prompt design and the underlying LLM. Our findings show that many plugins adopt insecure practices that undermine the built-in LLM safeguards.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑