arXiv:2606.21397cs.CRcs.AI2026-06

评测大模型在真实网页漏洞检测中的表现,发现顶级模型仅63%准确率。

Evaluating LLMs for Real-World Web Vulnerability Detection

论文配图:Evaluating LLMs for Real-World Web Vulnerability Detection
图 1 · 摘自论文原文
  • 用五种提示模板测试六款大模型在WordPress插件中查漏洞
  • 顶级模型Claude Opus 4.6检出率达63%,开源模型仅35%-48%
  • 限定范围的提示更有效,但多数模型重复实验结果不一致

大型语言模型(LLMs)在自动化漏洞检测中展现出潜力,但其在网页特定漏洞上的效果仍待验证。本研究对六款前沿模型(Claude Opus 4.6、Codex GPT-5.4、Gemini 3.1-pro-preview)和开源模型(Qwen 3.5、Qwen 3 Coder Next、MiniMax M2.5)进行基准测试,评估其在静态分析下识别真实世界WordPress插件漏洞的能力,涵盖SQL注入、存储型跨站脚本、路径遍历和远程代码执行等类型。通过三种实验迭代,采用五种不同结构、范围和复杂度的提示设计,探究模型与提示选择对检测效果的影响。结果显示,所有模型均能识别有效安全问题,但检出率因模型和提示而异:Claude Opus 4.6达到最高检出率63%,开源模型MiniMax M2.5表现与前沿模型相当(48%),自托管的Qwen 3.5仅达35%。限定漏洞范围的提示优于开放式提示,而提示复杂度影响较小。令人意外的是,无一模型在三次实验中保持完全报告一致性,最低仅50%。部分模型甚至未能识别某个插件中的基线漏洞。本研究揭示了基于LLM漏洞检测的机遇与局限,并为安全从业者提供实践建议,同时公开全部代码与数据以支持后续研究。

原文摘要 · Abstract (English)

Large Language Models (LLMs) have emerged as a promising tool for automated vulnerability detection, yet their effectiveness on web-specific vulnerabilities remains to be explored. This work benchmarks six frontier (Claude Opus 4.6, Codex GPT-5.4, Gemini 3.1-pro-preview) and open-weight models (Qwen 3.5, Qwen 3 Coder Next, MiniMax M2.5) on their ability to detect real-world web vulnerabilities using static analysis in WordPress plugins, including SQL injection, stored cross-site scripting, path traversal, and remote code execution. Using five prompt designs of varying structure, scope, and complexity across three experiment iterations, we aim to answer how model and prompt choice affects vulnerability detection. Our results show that all models are capable of detecting valid security issues, but the detection rate varies depending on the model and prompt. For example, Claude Opus 4.6 achieved the highest web vulnerability detection rate (63%), while open-weight MiniMax M2.5 performs on par with other frontier models (48%), and self-hosted Qwen 3.5 only achieved 35%. We show that scoped prompts that narrow the vulnerability scope outperform open-ended ones, whereas the prompt complexity has little impact. Surprisingly, no model achieved full reporting consistency across three experiment iterations, with some as low as 50%. Our experiments demonstrate the opportunities and limits of LLM-based vulnerability detection, as no model correctly identified one baseline vulnerability in one of the plugins. Additionally, we derive practical lessons learned for security practitioners and publish all code and data to support future research.

漏洞检测大模型安全评估

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