arXiv:2511.04538cs.CL2025-11

新指标揭示大模型生成漏洞的严重性与普遍性,推动安全改进。

From Model to Breach: Towards Actionable LLM-Generated Vulnerabilities Reporting

  • 提出提示暴露度(PE)衡量漏洞生成风险,融合严重性与触发概率。
  • 构建模型暴露度(ME)评分,量化模型生成漏洞的严重性和广泛性。
  • 发现主流开源大模型在真实场景中仍易生成已知高危漏洞,适合安全研究者参考。

随着大型语言模型(LLM)在软件开发中的作用日益重要,其生成代码中的漏洞对整体网络安全的影响也愈发显著。尽管已有多个针对LLM代码安全的评估基准和提升方案,但这些措施对主流编码用大模型的实际影响尚不明确。本文表明,即使最新的开源模型在真实使用场景下,仍会生成最早被报告的漏洞,说明当前的安全-功能权衡阻碍了有效修复。为此,我们引入一种新的严重性度量——提示暴露度(Prompt Exposure, PE),综合考虑漏洞严重性、生成概率及诱导性提示的特征。基于此,定义模型暴露度(Model Exposure, ME)分数,反映模型生成漏洞的严重程度与普遍性,以激励对最严重且常见的漏洞进行缓解。

原文摘要 · Abstract (English)

As the role of Large Language Models (LLM)-based coding assistants in software development becomes more critical, so does the role of the bugs they generate in the overall cybersecurity landscape. While a number of LLM code security benchmarks have been proposed alongside approaches to improve the security of generated code, it remains unclear to what extent they have impacted widely used coding LLMs. Here, we show that even the latest open-weight models are vulnerable in the earliest reported vulnerability scenarios in a realistic use setting, suggesting that the safety-functionality trade-off has until now prevented effective patching of vulnerabilities. To help address this issue, we introduce a new severity metric that reflects the risk posed by an LLM-generated vulnerability, accounting for vulnerability severity, generation chance, and the formulation of the prompt that induces vulnerable code generation - Prompt Exposure (PE). To encourage the mitigation of the most serious and prevalent vulnerabilities, we use PE to define the Model Exposure (ME) score, which indicates the severity and prevalence of vulnerabilities a model generates.

大模型安全漏洞检测代码生成

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。