JA EN
LearnInference & Serving
·★ MEMBER·PAPER·11 min read

Paper walkthrough: CyberFactory — turning wild CVEs into runnable training problems

An open-source pipeline that converts real CVEs into executable, verifiable tasks and uses a reusable vulnerability-analysis skill to synthesize teacher trajectories the student then internalizes. 58.1% Pass@1 on CyberGym.

ModalitytextTaskinference

CyberFactory: Scaling Cyber Security Capabilities with Instances from the Wild

Primary source — what this article is built on

undefined2026-08-24undefined2026-09-01same month

CyberFactory: Scaling Cyber Security Capabilities with Instances from the WildJian Yang, Haau-Sing Li, Shawn Guo et al. · 2026-08-24 · v2arXiv:2608.23181Paper page·PDF
undefined

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 \textbf{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 \modelname\footnote{\emph{Aegis} is, in Greek mythology, the protective shield of Zeus and Athena; the name reflects the model's defensive, security-oriented purpose.}, which internalizes the skill-guided procedure without requiring the skill at inference time. On CyberGym, \modelname reaches 52.4% Pass@1 under a one-hour budget, improving over its Qwen~3.5 base model by +22.8 points and outperforming the evaluated general-purpose backbones under the same scaffold.


The question the paper is asking

The original title is "CyberFactory: Scaling Cyber Security Capabilities with Instances from the Wild" (arXiv:2608.23181).

The abstract runs roughly like this. As LLMs get better at code, their potential in cybersecurity draws more attention, and closed-source models already deliver advanced capability. Open-source efforts, though, fall short in three ways: frontier open-weight models do not publish reproducible training recipes; existing open training solutions are isolated per task and lack scalable agentic data; and scaling agentic rollouts requires a strong domain prior. The paper therefore introduces 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). It turns public vulnerability artifacts — including CVEs from the wild — into executable and verifiable task instances, and uses a reusable vulnerability-analysis skill to guide the teacher through source inspection → problem solving with a domain prior → evidence-based validation. The supervision is agentic: the model touches tools and target environments and revises its solutions from execution feedback. Trained on those trajectories, OpenAegis reproduces the procedure without being handed the skill at inference time, and reaches 58.1% Pass@1 on CyberGym under a one-hour budget — 28.5 points above its Qwen 3.5 base model.

The analogy: not "the lock opened" but "this key opened it"

Automated security work conjures images of an AI brute-forcing its way in. What this paper actually does is closer to reproducing a scientific experiment.

Say an old version of some software had a flaw that was later fixed. To prove you really hit that flaw, you only need one input that crashes the pre-patch build and does not crash the post-patch build. If it crashes the patched build too, you merely tripped over some other bug. Because the test has two sides, a machine can decide pass or fail with no human in the loop.

The paper calls the crashing input a PoC (proof-of-concept) and calls the two-sided test a differential oracle (§4.1). That move — from "AI does security" to a gradable task — is where everything else starts.

Four terms, up front

Mechanism 1: letting a machine decide what counts as correct

With a candidate input xx, a pre-patch build bb^{-} and a post-patch build b+b^{+}, success is defined as follows (§4.1).

V(x)=1 ⁣[Crash(b,x)]1 ⁣[¬Crash(b+,x)]\mathcal{V}(x)=\mathbf{1}\!\left[\mathrm{Crash}(b^{-},x)\right]\wedge\mathbf{1}\!\left[\neg\,\mathrm{Crash}(b^{+},x)\right]
(1)

Symbol by symbol: Crash(b,x)\mathrm{Crash}(b,x) is true when running build bb on input xx triggers the target sanitizer failure; 1[]\mathbf{1}[\cdot] turns that into a 1 or a 0; \wedge is "and"; ¬\neg is "not". So equation (1) says, in words, "one point if it crashes before the patch and does not crash after it."

Because the verdict is programmatic, the agent can grade itself without waiting for a human, and can read the sanitizer trace as a hint for its next candidate. The paper describes this as using the oracle as a refinement signal: PoC construction becomes an executable propose → verify → refine loop rather than open-ended generation (§4.1).

# skeleton of the propose-verify-refine loop the paper describes (pseudocode)
for _ in range(budget):
    x = agent.propose(codebase, description, feedback)
    crashed_pre  = run(build_pre,  x)      # does it crash before the patch?
    crashed_post = run(build_post, x)      # does it stay quiet after it?
    if crashed_pre and not crashed_post:
        return x                            # V(x) = 1
    feedback = sanitizer_log(crashed_pre)   # material for the next attempt

Mechanism 2: turning wild CVEs into problems

To build training data you need bb^{-} and b+b^{+} to actually compile and run. The paper lists three sources of increasing difficulty (§3.1): ARVO is the easiest, OSS-Fuzz sits in the middle, and CVEs from the wild are the hardest. From ARVO you get pre- and post-patch Docker images plus a ground-truth PoC directly. For OSS-Fuzz cases where only the vulnerability-introducing commit is known, the paper applies the same binary search ARVO uses to locate the corresponding fix.

Wild CVEs come with little more than affected version ranges and metadata such as CWE types, so the pipeline runs three steps. First, keep only CVEs that carry a CWE type. Second, locate the fix commit from the affected version range, taking the version before it as the vulnerable image and the version after it as the fixed one. Third, verify the instance: filter out anything inference models already solve by directly generating a PoC, keeping only the ones that stay hard. Note what the paper is explicit about — extra signals such as CVE vulnerability types and OSS-Fuzz crash information are used only for this verification step and discarded during data synthesis and training. That keeps parts of the answer from leaking into the prompt.

The problem statement itself is constructed too. An LLM classifies the fix commit message; only low-quality messages get rewritten from vulnerability evidence plus the fix commit, while good messages are kept as-is. QA data is built answer-first (§3.2): the answer must come from a trusted source, and the model's job is

What's behind this

§

Members-only from here

371 walkthroughs, 26 textbook chapters, 48 student units and 6 close readings — all included for $4.99/mo, with three new explainers every day. Cancel any time; access runs to the end of the period.

Already a member? Sign in to keep reading

References

  1. Jian Yang, Haau-Sing Li, Shawn Guo, Zixi Zhao et al.. (2026-08-24) CyberFactory: Scaling Cyber Security Capabilities with Instances from the Wild. arXiv:2608.23181Paper page·PDF

This article is written from the source paper above. Where they differ, the original is authoritative.

Comments

Sign in to comment