arXiv(opens in a new tab)cs.CRAug 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2608.23181

CyberFactory: Scaling Cyber Security Capabilities with Instances from the Wild

Jian Yang, Haau-Sing Li, Shawn Guo, Zixi Zhao, Yibo Tan, Jiajun Wu, Aishan Liu, Zhoujun Li, Xianglong Liu, Tianyu Zheng, Bryan Dai, Chengran Yang

ABSTRACT

As large language models (LLMs) continue to advance in coding capabilities, their potential in cybersecurity has drawn increasing research attention, with closed-source LLMs (e.g., Mythos) delivering advanced cybersecurity capabilities. However, existing open-source efforts remain limited: frontier open-weight models do not provide reproducible cybersecurity training solutions, open-source training solutions focus on isolated tasks and lack scalable agentic data, and scaling agentic rollouts requires strong domain priors. In this work, we introduce CyberFactory, a unified open-source framework that connects data construction, trajectory synthesis, and model training across proof-of-concept (PoC) generation, vulnerability patching, and cybersecurity question answering (CyberQA). CyberFactory transforms public vulnerability artifacts, including CVEs from the wild, into executable and verifiable task instances. It further uses a reusable vulnerability-analysis skill to guide the teacher through source inspection, problem solving with domain prior, and evidence-based validation. The resulting supervision is agentic: the model interacts with tools and target environments and revises its solutions according to execution feedback. Using these trajectories, we train and release OpenAegis 1^{1}, which internalizes the skill-guided procedure without requiring the skill at inference time. On CyberGym, OpenAegis reaches 58.1% Pass@1 under a one-hour budget, improving over its Qwen 3.5 base model by 28.5 points and outperforming the evaluated general-purpose backbones under the same scaffold.

1 INTRODUCTION

The development of large language model (LLM) has led to steady improvements in their capabilities in cybersecurity, with closed-source models delivering non-trivial performance on cybersecurity tasks (Zhang et al., 2025; Wang et al., 2026b; Shi et al., 2026; Wang et al., 2026a). Associated risks of LLMs attacking systems also arise, with emerging attacking capabilities observed under both controlled evaluations (Marchand et al., 2026) and realistic deployments (OpenAI, 2026), thus calling for effective and reproducible cybersecurity methods that help inspect potential software vulnerabilities and execute defensive actions.

Existing open-source efforts have addressed this need, yet fall short from different dimensions. Frontier open-weight models (GLM-5-Team et al., 2026; Team et al., 2026; DeepSeek-AI et al., 2026) demonstrate strong cybersecurity capabilities, but do not provide reproducible solutions for training these models. Open-source solutions span the gamut of cybersecurity capabilities like capture-the-flag (CTF), while all remain isolated efforts in disparate settings (Zhou et al., 2019; Nie et al., 2025; Fu et al., 2022; Zhuo et al., 2026; Yu et al., 2025; Levi et al., 2024). Moreover, in spite of the

∗^{*}Corresponding Author.

†^{\dagger}Project Leader.

1^{1}Aegis (/ˈiːdʒɪs/) is, in Greek mythology, the protective shield of Zeus and Athena; the name reflects the model’s defensive, security-oriented purpose.

Figure

Figure 1: CyberFactory turns real-world vulnerability evidence into executable, difficulty-calibrated supervision for training OpenAegis on vulnerability detection, patch generation, and CyberQA.

coverage of capabilities, these solutions still fail to address the need for scalable agentic data for model training. Last but not least, scaling the training of such models requires more than rollouts with simple prompts; it requires an injection of a strong domain prior as guidance (Ma et al., 2026; Liu et al., 2026; He et al., 2026). These gaps together motivate a key research question: How can we build a unified and open-source approach that scales the training of cybersecurity models?

In this paper, we introduce CyberFactory, a unified open-source framework for scaling the training of cybersecurity models. Rather than releasing model weights in isolation, CyberFactory provides an end-to-end recipe that connects data construction, trajectory synthesis, and model training. The framework transforms public vulnerability artifacts into executable and verifiable instances spanning vulnerability detection, patch generation, and CyberQA, bringing otherwise disparate tasks into a common training pipeline. Crucially, its supervision is agentic: the teacher inspects code, invokes tools, interacts with target environments, and revises its solutions according to execution feedback. CyberFactory also combines crafted instance pipeline with a reusable vulnerability-analysis skill that encodes task-independent procedures for source inspection, problem solving with domain prior, and evidence-based validation. Finally, We use synthesized data to train OpenAegis, which internalizes the prior-guided procedure without requiring the skill at inference time, while still demonstrating strong cybersecurity capabilities.

Under the one-hour CyberGym budget, OpenAegis achieves 58.1% Pass@1, improving over its Qwen 3.5 base model by 28.5 points and surpassing the substantially larger GLM 5.2 and Kimi K2.7 baselines under the same evaluation scaffold. The benefit extends beyond the final model. When applied to the teacher, the vulnerability-analysis skill raises GLM 5.2 Pass@1 from 43.3% to 46.5% despite reducing each attempt from 60 to 15 minutes, increasing the throughput of successful training trajectories. Trajectory analysis further shows that OpenAegis reproduces the skill-induced, prior-guided workflow without receiving the skill at inference time. Together, these results indicate that CyberFactory scales cybersecurity capability by turning a reusable domain procedure into verifiable agentic supervision that is subsequently internalized by the trained model.

Our contributions are as follows:

• We present CyberFactory, a unified, open-source recipe for training cybersecurity models. It connects data construction, trajectory synthesis, and model training across vulnerability detection, patch generation, and CyberQA, making both the resulting supervision and its construction procedure reproducible.

• We develop a scalable agentic-data pipeline that converts CVEs from the wild into executable, verifiable task instances and uses a reusable vulnerability-analysis skill to guide tool-interactive trajectory synthesis. This couples real-world vulnerability evidence with domain priors and execution feedback rather than relying on unconstrained model rollouts.

• We release OpenAegis 2^{2}, a multi-task cybersecurity model trained on the resulting agentic trajectories. Our evaluations and trajectory analyses show that the model internalizes the skill-induced workflow without requiring the skill at inference time, while outperforming substantially larger baselines under the same evaluation scaffold.

References (35)