TL;DR
Just because your Java application imports a vulnerable third-party library—or even calls a function that eventually reaches it—doesn’t mean an attacker can actually exploit your app. To find out for sure, VULNSEER combines Large Language Models (LLMs) with Reinforcement Learning (RL) to automatically build working Proof-of-Concept exploits from the application's front door all the way down to deep library bugs. By figuring out how a bug's trigger condition shape-shifts across layers of code, it solves complex, multi-step call chains where existing tools completely stall out.
What Problem Does This Paper Address?
Anyone who has maintained modern software knows the fatigue of dependency security alerts. Most automated scanners only tell you if a vulnerable library exists in your build or if there’s a theoretical path to the buggy function (the "sink"). Neither tells you if an attacker at your project's entry point can actually craft an input that survives the journey and triggers the bug.
Recent tools try to prove exploitability by automatically generating test payloads. They work great when your code calls the buggy library directly. However, when the call chain stretches across multiple functions, their success rates fall off a cliff.
Why? Because triggering a bug deep inside a dependency rarely looks like passing a single "poisoned" integer down a bucket brigade of function arguments. Across layers of real-world object-oriented code, that integer requirement might morph into an object field, which depends on what sits inside a list, which is ultimately controlled by a string in a configuration file parsed by an off-chain factory class. Existing tools fail because they don't track how exploit conditions re-express themselves across layers, nor can they pick out the relevant off-chain helper code without drowning an LLM in noisy, irrelevant context.
Methods
VULNSEER mimics how a sharp human security analyst reverse-engineers a deep bug, operating in four stages:
- Information Prep (Standard + LLM): Using static analysis (Joern), it builds a pruned Code Property Graph (CPG) along the call chain from the client entry to the library sink. Meanwhile, an LLM reads a library-level Proof-of-Concept test to extract the exact trigger rules at the sink.
- Backward Goal Inference & Forward Planning (Novel): Starting at the sink and stepping backward to the entry point, an LLM rewrites what each caller needs to satisfy—capturing rules for both direct arguments and hidden object states (like fields or list contents). VULNSEER then flips these backward breadcrumbs into a forward step-by-step execution plan.
- RL-Guided State Resolution (Novel): Walking forward from the entry point, an LLM solves the constraints at each step. To find off-chain factory or constructor logic without blowing up the prompt, a lightweight RL policy (a Qwen3-8B model trained via PPO) acts as a strict bouncer, selecting only code snippets that actually construct or propagate the target state.
- Dynamic Validation (Standard): It instantiates the solved arguments and object states, runs the code using an instrumented Java class loader, and verifies against a test oracle that the vulnerability genuinely triggered.
Datasets
The authors built on the existing MAGNETO benchmark (182 exploitable call chains across 49 Java client projects, 21 vulnerable libraries, and 32 CVEs). To better test deep call chains, two Java security experts spent two months manually verifying new multi-hop paths on those same project-vulnerability pairs.
This yielded an expanded corpus of 319 ground-truth exploitable call chains (89 direct calls, 204 short chains of 2–5 hops, and 26 long chains of $\ge$6 hops). They reserved 50 chains (with strictly disjoint CVEs) to train the RL context selector, leaving 269 chains for head-to-head evaluation.
Key Insights and Ideas
- Exploit synthesis is state translation, not value forwarding: Carrying a bad value across functions isn't enough; you have to translate what controls that condition at each boundary (e.g., translating "invalid block size" at layer 6 into
table = "csv"at layer 0). Removing backward goal inference tanked long-chain success from 66.67% down to 11.11%. - Throwing the whole codebase at an LLM backfires: An ablation variant that fed all candidate surrounding code into the solver ("All-Include") got the exact same dismal 11.11% on long chains as having no goal planning at all. Too much syntactic noise distracts the solver at critical branches.
- Small RL policies beat giant LLMs at picking context: Using a small RL-tuned model to filter code snippets didn't just run 7x faster on long chains than asking GPT-5.2 to pick its own context—it actually solved more long-chain exploits (12 vs. 9), proving that dense reward shaping beats raw model size for context curation.
Key Results
- Overall Accuracy: Using GPT-5.2 as the reasoning backbone, VULNSEER achieved an 87.11% ($\pm$0.62%) overall exploit generation success rate across the 269 test chains, comfortably beating MAGNETO (58.74%), TRANSFER (19.70%), VULEUT (17.84%), and VESTA (16.36%). This 24–28 percentage point lead over MAGNETO held steady across five different LLM backbones (including Claude-Sonnet-4.6, DeepSeek-V3.2, and Qwen3.5).
- Long-Chain Dominance: On chains of length $\ge$6, VULNSEER achieved a 64.81% mean success rate (solving 12/18 cases in a fixed run), whereas MAGNETO managed 5.56% (1/18) and all other baselines scored 0.00%.
- Speed: Despite using more tokens than fuzzing-based MAGNETO (27.9k vs. 11.0k), VULNSEER finished over 7x faster overall (177.8s vs. 1436.9s per chain)—and roughly 14x faster on long chains—by avoiding slow directed-fuzzing loops.
Limitations and Future Work
- External Inputs Outside the Threat Model: VULNSEER assumes an attacker controls inputs to the client entry method. When a vulnerable sink actually consumes data fetched mid-execution from an external HTTP server (e.g., a WeChat API response), entry-side payloads alone cannot trigger it.
- Ecosystem & Sample Scope: The system is tailored to Java and relies on just 18 evaluation cases for its long-chain ($\ge$6 hops) category due to the heavy manual effort required for ground-truth validation. Expanding the long-chain dataset and adapting the framework beyond Java remain open for future work.
- Pretraining Data Leakage: The authors did not directly audit whether public CVEs in the benchmark appeared in the LLMs' pretraining data, though they note that LLM-only ablations still failed on long chains—indicating memorization alone cannot solve project-specific state routing.
Summary updated