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.


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

0
下载
关闭预览

相关内容

Chatbot,聊天机器人。 chatbot是场交互革命,也是一个多技术融合的平台。上图给出了构建一个chatbot需要具备的组件,简单地说chatbot = NLU(Natural Language Understanding) + NLG(Natural Language Generation)。

知识荟萃

精品入门和进阶教程、论文和代码整理等

更多

查看相关VIP内容、论文、资讯等
Python图像处理,366页pdf,Image Operators Image Processing in Python
Kaggle知识点:伪标签Pseudo Label
AINLP
40+阅读 · 2020年8月9日
论文浅尝 | GEOM-GCN: Geometric Graph Convolutional Networks
开放知识图谱
14+阅读 · 2020年4月8日
Spooftooph - 用于欺骗或克隆蓝牙设备的自动工具
黑白之道
17+阅读 · 2019年2月27日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
VIP会员
相关基金
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员