CyberForge: Verified Vulnerability Injection at Repository Level for Cybersecurity Agent Training
作者: Amine Lbath, Manan Suri, Aurelien Delaitre, Vadim Okun, Massih-Reza Amini, Ram D. Sriram, Dinesh Manocha
分类: cs.CR, cs.AI, cs.SE
发布日期: 2026-08-06
💡 一句话要点
提出CyberForge以解决网络安全代理训练数据不足问题
🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)
关键词: 网络安全 漏洞注入 训练数据生成 C/C++项目 动态验证 补丁修复 大型语言模型
📋 核心要点
- 现有的网络安全代理在发现和修补复杂漏洞方面存在显著不足,尤其是在快速发展的代码库中。
- CyberForge框架通过在真实C/C++项目中注入漏洞,生成可用于训练的安全数据,解决了数据稀缺的问题。
- 实验结果显示,基于CyberForge生成的数据进行微调,SEC-bench的补丁修复性能提升了3.3到14.7分,表现出良好的泛化能力。
📝 摘要(中文)
尽管近年来取得了一些进展,前沿的大型语言模型(LLM)代理在发现和修补复杂软件漏洞方面仍然有限。现有的代理可以帮助攻击者,而防御者则必须不断识别和修补快速增长的代码库中的所有漏洞。为此,CyberForge框架通过在真实的C/C++项目中注入漏洞,合成可执行的、基于代码库的安全训练数据。每个实例都经过动态验证,确保注入的构建通过项目的单元测试,并且生成的漏洞证明在注入的构建上触发,而在干净的构建上不触发。CyberForge不受已披露漏洞的限制,因此在数据增强技术中具有更好的扩展性。最终生成的语料库包含1034个经过验证的漏洞,覆盖80个项目和63个弱点类别。基于该语料库的微调在SEC-bench补丁修复上提升了3.3到14.7分,所有配置均有改善。
🔬 方法详解
问题定义:论文旨在解决网络安全代理训练数据不足的问题,现有方法依赖于历史CVE数据,限制了数据的可用性和扩展性。
核心思路:CyberForge通过在真实的C/C++项目中注入漏洞,动态生成可执行的安全训练数据,确保每个实例的有效性和可靠性。
技术框架:CyberForge的整体架构包括漏洞注入模块、动态验证模块和数据生成模块。首先在项目中注入漏洞,然后通过单元测试验证构建的有效性,最后生成漏洞证明。
关键创新:CyberForge的主要创新在于其动态验证机制,确保生成的漏洞实例不仅有效且可重复,克服了传统方法的局限性。
关键设计:在设计中,注入的漏洞必须通过项目的单元测试,且生成的漏洞证明需在注入构建上触发,确保数据的真实性和有效性。
🖼️ 关键图片
📊 实验亮点
实验结果表明,基于CyberForge生成的数据进行微调,SEC-bench补丁修复性能提升了3.3到14.7分,尤其是在31B模型中,其性能接近GPT-5.4-mini教师,显示出良好的泛化能力和有效性。
🎯 应用场景
CyberForge的研究成果在网络安全领域具有广泛的应用潜力,尤其是在安全代理的训练和评估中。通过提供丰富的训练数据,CyberForge可以帮助开发更强大的防御性工具,提高软件的安全性。此外,该框架还可以扩展到其他编程语言和环境,进一步推动安全研究的发展。
📄 摘要(原文)
Despite recent advances, frontier large language model (LLM) agents remain limited in discovering and patching complex vulnerabilities in real-world software. Generally available agents can already aid attackers, who only need to find one exploitable weakness, while defenders must continuously identify and patch all vulnerabilities across fast-growing codebases. Stronger defensive agents would help close this gap, yet the scarcity of security training data with reproducible build and execution environments remains a bottleneck. We present CyberForge, a framework that synthesizes executable, repository-level security training data by injecting vulnerabilities into real C/C++ projects. It validates each instance dynamically: the injected build must pass the project's unit tests, and generated proof-of-vulnerability (PoV) must trigger on the injected build and not on the clean one. CyberForge is not limited by the availability of disclosed vulnerabilities, therefore it can scale in comparison to data augmentation techniques which rely on historic CVE data. The resulting corpus holds 1034 validated vulnerabilities across 80 projects and 63 weakness categories, with edit locality similar to real CVE patches under a real-versus-real noise floor. Fine-tuning on trajectories collected over this corpus improves SEC-bench patch repair by +3.3 to +14.7 points, in all six configurations of three model scales and two teachers, with the 31B student reaching its GPT-5.4-mini teacher, 72.7% against 74.0%. These gains generalize out of distribution to PatchEval, a corpus containing other programming languages, where every configuration also improves and the 31B student passes its teacher.