CyberForge

Verified Vulnerability Injection at Repository Level for Cybersecurity Agent Training

Amine Lbath1,2,*, Manan Suri1,3,*, Aurelien Delaitre1, Vadim Okun1, Massih-Reza Amini2, Ram D. Sriram1, Dinesh Manocha3

1National Institute of Standards and Technology  ·  2Université Grenoble Alpes, CNRS  ·  3University of Maryland, College Park

*Equal contribution

Paper Code 🤗 Dataset
CyberForge pipeline: OSS-Fuzz projects feed two injection pipelines, a differential crash oracle validates each instance, and teacher trajectories fine-tune a student model.
From real OSS-Fuzz projects, two injection pipelines produce candidate vulnerabilities that a differential proof-of-vulnerability oracle validates; the resulting (vuln, patch) pairs become agent tasks, and teacher trajectories fine-tune the student model.
1k+
validated vulnerabilities
80
real C/C++ projects
63
weakness categories
+14.7
max SEC-bench gain (pts)

Abstract

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 a 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 that rely on historic CVE data. The resulting corpus holds 1,034 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% vs. 74.0%). These gains generalize out of distribution to PatchEval, a corpus containing other programming languages, where every configuration improves and the 31B student passes its teacher.

Approach

CyberForge turns buildable OSS-Fuzz projects into training instances by injecting new weaknesses rather than mining historical disclosures, decoupling corpus growth from the rate of human discovery while keeping reproducible build and execution environments. Two complementary pipelines feed a shared oracle:

Fuzzer-guided injection uses OSS-Fuzz coverage to find sites reachable by an existing harness, so validation can lean on the harness itself. Agentic in-context injection synthesizes weaknesses beyond harness reach, combining autonomous agents, static analysis, retrieved examples of real CVE fixes, and iterative retry.

Every instance is checked by a differential PoV oracle: the clean and injected builds must both pass all unit tests, and the PoV must trigger only on the injected build. Validated (vulnerability, patch) pairs become PoV and patch tasks; teacher trajectories over these tasks fine-tune open student models into stronger security agents.

Results

Table 1: Students fine-tuned on CyberForge trajectories at three scales and under two teachers, evaluated on SEC-bench (C/C++, in-domain) and PatchEval (Python, JavaScript, Go, out-of-distribution). Arrows give the gain over the corresponding base model.

ModelSEC-bench (%)PatchEval
Strict (%)PoV (%)
Teachers (reference)
GPT-5.4-mini74.013.015.2
Gemma 4 31B58.012.214.4
Gemma 4 E4B
Gemma 4 E4B base6.02.63.9
CyberForge-E4B Gemma 4 31B 10.7↑4.75.2↑2.66.5↑2.6
CyberForge-E4B GPT-5.4-mini 9.3↑3.39.1↑6.510.4↑6.5
Gemma 4 12B
Gemma 4 12B base8.73.93.9
CyberForge-12B Gemma 4 31B 16.0↑7.36.1↑2.28.7↑4.8
CyberForge-12B GPT-5.4-mini 16.7↑8.012.8↑8.914.1↑10.2
Gemma 4 31B
Gemma 4 31B base58.012.214.4
CyberForge-31B Gemma 4 31B 64.7↑6.712.4↑0.215.7↑1.3
CyberForge-31B GPT-5.4-mini 72.7↑14.714.8↑2.616.5↑2.1

Badges give the teacher that supervised each student. All six student–teacher configurations improve on both benchmarks; CyberForge-31B reaches its GPT-5.4-mini teacher on SEC-bench (72.7 vs. 74.0) and passes it on PatchEval.

Resources

BibTeX

@misc{cyberforge2026,
  title  = {CyberForge: Verified Vulnerability Injection at Repository Level
            for Cybersecurity Agent Training},
  author = {Lbath, Amine and Suri, Manan and Delaitre, Aurelien and Okun, Vadim
            and Amini, Massih-Reza and Sriram, Ram D. and Manocha, Dinesh},
  year   = {2026},
  url    = {https://cyb3rforge.github.io}
}