arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2610.34290cs.CRcs.AIcs.SE
收藏

用大语言模型修复Web应用中的失效访问控制:一项实证基准研究

Repairing Broken Access Control in Web Applications with LLMs: An Empirical Benchmark Study

Institute of Information Engineering, Chinese Academy of Sciences(中国科学院信息工程研究所);Institute of Software, Chinese Academy of Sciences(中国科学院软件研究所)

Mingrui Liu, Liang He, Xinchu Wang, Yeting Li, Dongxu Han, Yunpeng Li, Yuling Liu

AI总结:

本研究构建首个BAC修复基准BAC-Bench,评估LLMs修复BAC漏洞的效果,发现Apply-Feedback等支架可提升修复率,部分LLM补丁优于官方补丁,明确了相关能力边界并提供应用指导。

摘要:

失效访问控制(Broken Access Control, BAC)是最严重的Web应用漏洞类别之一,但其自动化修复仍未得到充分探索。与内存安全漏洞不同,BAC是一种逻辑漏洞,其修复需要深入理解应用的访问控制模型和业务语义,而传统自动化漏洞修复技术对此处理效果不佳。大语言模型(Large Language Models, LLMs)为解决该问题提供了有前景的途径,但目前尚无用于研究LLMs修复BAC漏洞效果的标准基准。我们构建了BAC-Bench,这是首个用于BAC修复的基准,包含来自6个广泛使用的Web应用的46个真实BAC漏洞,涉及4种编程语言。每个漏洞都配备了沙箱运行环境、PoC验证程序和功能测试程序。我们进一步提出了一个BAC修复策略框架,该框架从位置、覆盖范围、机制和内容四个维度对任何BAC补丁进行表征。在BAC-Bench上评估8个基础LLM和2个商业LLM智能体后,我们发现单轮基础LLM平均修复37.68%的漏洞,而Apply-Feedback和Navigate-and-Locate这两个极简支架将该平均提升至66.03%,表现最佳的基础LLM达到75.36%,接近最佳智能体的78.99%。值得注意的是,一些LLM生成的补丁优于官方补丁,其中一个补丁还意外关闭了一个已潜伏三年的零日漏洞。我们的研究结果明确了基于LLM的BAC修复的当前能力边界,并为其实际应用提供了指导。

英文摘要:

Broken access control (BAC) ranks among the most severe web-application vulnerability classes, yet its automated repair remains largely unexplored. Unlike memory-safety vulnerabilities, BAC is a logic vulnerability whose repair demands a deep understanding of an application's access-control model and business semantics, which traditional automated vulnerability repair techniques handle poorly. Large language models (LLMs) open a promising avenue for this problem, but no standard benchmark exists for studying how well they repair BAC vulnerabilities. We construct BAC-Bench, the first benchmark for BAC repair, consisting of 46 real-world BAC vulnerabilities drawn from six widely used web applications spanning four programming languages. Each vulnerability is equipped with a sandboxed runtime environment, a PoC validation program and a functional test program. We further propose a BAC repair-strategy framework that characterizes any BAC patch along four dimensions, Position, Coverage, Mechanism, and Content. Evaluating eight base LLMs and two commercial LLM agents on BAC-Bench, we find that single-turn base LLMs repair 37.68% of the vulnerabilities on average, while two minimal scaffolds, Apply-Feedback and Navigate-and-Locate, raise this average to 66.03%, with the best base LLM reaching 75.36%, close to the 78.99% of the best agent. Notably, some LLM-generated patches surpass the official patches, and one incidentally closed a zero-day vulnerability that had lain dormant for three years. Our findings delineate the current capability boundary of LLM-based BAC repair and offer guidance toward its practical adoption.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑