首次系统评估大模型在检测JavaScript漏洞上的能力,发现其表现不可靠。
Large Language Models Cannot Reliably Detect Vulnerabilities in JavaScript: The First Systematic Benchmark and Evaluation
- 提出三原则构建真实有效的评测基准
- 测试7个主流大模型,均暴露推理与鲁棒性缺陷
- 适合安全研究者与大模型评估团队参考
现有漏洞检测方法虽多基于大语言模型(LLMs),但其实际能力仍存疑。现有基准存在三大缺陷:覆盖不全、标签不合理导致低估,以及使用孤立代码文件造成高估。本文首次提出三项构建原则:全面性、避免低估、避免高估,并据此开发FORGEJS框架,自动生成评测基准。基于此构建了首个系统性基准ARENAJS,并提出JUDGEJS自动评估框架。首次对7个主流商用大模型进行系统评估,结果显示大模型在推理能力和鲁棒性上均存在严重不足,表明基于大模型的可靠JavaScript漏洞检测仍是开放挑战。
原文摘要 · Abstract (English)
Researchers have proposed numerous methods to detect vulnerabilities in JavaScript, especially those assisted by Large Language Models (LLMs). However, the actual capability of LLMs in JavaScript vulnerability detection remains questionable, necessitating systematic evaluation and comprehensive benchmarks. Unfortunately, existing benchmarks suffer from three critical limitations: (1) incomplete coverage, such as covering a limited subset of CWE types; (2) underestimation of LLM capabilities caused by unreasonable ground truth labeling; and (3) overestimation due to unrealistic cases such as using isolated vulnerable files rather than complete projects. In this paper, we introduce, for the first time, three principles for constructing a benchmark for JavaScript vulnerability detection that directly address these limitations: (1) comprehensiveness, (2) no underestimation, and (3) no overestimation. Guided by these principles, we propose FORGEJS, the first automatic benchmark generation framework for evaluating LLMs' capability in JavaScript vulnerability detection. Then, we use FORGEJS to construct ARENAJS-the first systematic benchmark for LLM-based JavaScript vulnerability detection-and further propose JUDGEJS, an automatic evaluation framework. We conduct the first systematic evaluation of LLMs for JavaScript vulnerability detection, leveraging JUDGEJS to assess seven popular commercial LLMs on ARENAJS. The results show that LLMs not only exhibit limited reasoning capabilities, but also suffer from severe robustness defects, indicating that reliable JavaScript vulnerability detection with LLMs remains an open challenge.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。