本研究通过基准测试六种前沿和开源LLMs在WordPress插件静态分析中的Web漏洞检测能力,发现模型和提示设计显著影响检测率,其中Claude Opus 4.6达到最高63%,但所有模型均存在报告不一致问题。
摘要:
大型语言模型(LLMs)已成为自动化漏洞检测的有前景工具,但其在Web特定漏洞上的有效性仍有待探索。本研究对六种前沿模型(Claude Opus 4.6、Codex GPT-5.4、Gemini 3.1-pro-preview)和开源模型(Qwen 3.5、Qwen 3 Coder Next、MiniMax M2.5)进行了基准测试,评估它们使用静态分析检测WordPress插件中真实世界Web漏洞的能力,包括SQL注入、存储型跨站脚本、路径遍历和远程代码执行。通过三次实验迭代中使用五种不同结构、范围和复杂度的提示设计,我们旨在回答模型和提示选择如何影响漏洞检测。结果表明,所有模型都能检测到有效的安全问题,但检测率因模型和提示而异。例如,Claude Opus 4.6实现了最高的Web漏洞检测率(63%),而开源MiniMax M2.5与其他前沿模型表现相当(48%),自托管的Qwen 3.5仅达到35%。我们显示,缩小漏洞范围的提示优于开放式提示,而提示复杂度影响不大。令人惊讶的是,没有模型在三次实验迭代中实现完全的报告一致性,有些低至50%。我们的实验展示了基于LLM的漏洞检测的机会和局限性,因为没有一个模型正确识别了其中一个插件中的一个基线漏洞。此外,我们为安全从业者总结了实用的经验教训,并发布了所有代码和数据以支持未来研究。
英文摘要:
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.
VulDetectBench: Evaluating the Deep Capability of Vulnerability Detection with Large Language Models
Institute of BigData, Fudan University(复旦大学大数据研究院);School of Computer Science, Fudan University(复旦大学计算机科学学院);School of Computer Science, Huazhong University of Science and Technology(华中科技大学计算机科学学院);Purple Mountain Laboratories(紫金山实验室);School of Software Engineering, Huazhong University of Science and Technology(华中科技大学软件学院)
MalURLBench: A Benchmark Evaluating Agents' Vulnerabilities When Processing Web URLs
Zhejiang University(浙江大学);National University of Malaysia (Universiti Kebangsaan Malaysia)(马来西亚国立大学);Hangzhou City University(杭州市大学);Yangzhou University(扬州大学);Chongqing University(重庆大学);Binjiang Institute of Zhejiang University(浙江大学滨江研究院)
Evaluating LLaMA 3.2 for Software Vulnerability Detection
Research Group on Intelligent Engineering and Computing for Advanced Innovation and Development (GECAD), School of Engineering of the Polytechnic of Porto(波尔图理工学院工程学院);INESC TEC/Polytechnic of Porto - School of Engineering(INESC TEC/波尔图理工学院工程学院)
Decoupling Reconnaissance and Exploitation: Measuring the Capability Boundaries of LLM-Based Web Penetration Testing
University of Science and Technology of China(中国科学技术大学);Suzhou Institute for Advanced Research, University of Science and Technology of China(中国科学技术大学苏州先进研究院);Nanjing University of Science and Technology(南京理工大学);Research Institute, Runjian Co., Ltd(润杰有限公司研究院)
PACEbench: A Framework for Evaluating Practical AI Cyber-Exploitation Capabilities
Shanghai Artificial Intelligence Laboratory(上海人工智能实验室);Shanghai Jiao Tong University(上海交通大学);Institute of Information Engineering, Chinese Academy of Sciences(中国科学院信息工程研究所)
TPSQLi: Test Prioritization for SQL Injection Vulnerability Detection in Web Applications
National Taiwan University(台湾大学);CyberLink Corporation(网路家庭资讯事业股份有限公司);National Yang Ming Chiao Tung University(国立阳明交通大学);National Dong Hwa University(国立东华大学)
How Much Can We Trust LLM Search Agents? Measuring Endorsement Vulnerability to Web Content Manipulation
Center of Excellence for Generative AI, KAUST(KAUST生成式人工智能卓越中心);Jilin University(吉林大学);Zhejiang University(浙江大学);The Swiss AI Lab, IDSIA-USI/SUPSI(瑞士人工智能实验室 IDSIA-USI/SUPSI);NNAISENSE