LLM误读表情符号致代码出错,可能引发无声安全漏洞。
False Friends in the Shell: Unveiling the Emoticon Semantic Confusion in Large Language Models
- 构建自动化数据集,测试6个LLM在21种场景下的表情符号理解能力。
- 平均混淆率超38%,90%错误输出语法正确但违背用户意图。
- 漏洞可迁移至主流智能体框架,现有防护方法基本无效。
表情符号广泛用于数字交流以表达情感意图,但其对大型语言模型(LLMs)的安全影响尚未被充分探索。本文发现表情符号语义混淆这一漏洞:LLM会误读基于ASCII的表情符号,导致执行意外甚至破坏性操作。为系统研究该现象,我们开发了自动化数据生成管道,构建包含3,757个面向代码的测试用例的数据集,涵盖21种元场景、4种编程语言及不同上下文复杂度。对6个LLM的测试显示,表情符号语义混淆普遍存在,平均混淆率超过38%。更严重的是,超过90%的错误响应表现为“无声失败”——语法正确但偏离用户意图,可能引发破坏性安全后果。此外,该漏洞易迁移到主流智能体框架,现有基于提示的缓解方法基本无效。我们呼吁社区重视这一新兴威胁,推动有效缓解机制的研发,以保障LLM系统的安全性与可靠性。
原文摘要 · Abstract (English)
Emoticons are widely used in digital communication to convey affective intent, yet their safety implications for Large Language Models (LLMs) remain largely unexplored. In this paper, we identify emoticon semantic confusion, a vulnerability where LLMs misinterpret ASCII-based emoticons to perform unintended and even destructive actions. To systematically study this phenomenon, we develop an automated data generation pipeline and construct a dataset containing 3,757 code-oriented test cases spanning 21 meta-scenarios, four programming languages, and varying contextual complexities. Our study on six LLMs reveals that emoticon semantic confusion is pervasive, with an average confusion ratio exceeding 38%. More critically, over 90% of confused responses yield 'silent failures', which are syntactically valid outputs but deviate from user intent, potentially leading to destructive security consequences. Furthermore, we observe that this vulnerability readily transfers to popular agent frameworks, while existing prompt-based mitigations remain largely ineffective. We call on the community to recognize this emerging vulnerability and develop effective mitigation methods to uphold the safety and reliability of the LLM system.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。