Hunt new gadget chains.
Not the ones your JDK already killed.
Point GadgetHunter at a JAR, Spring Boot fat JAR or WAR. It derives taint rules from the bytecode, searches for deserialization chains, and ranks genuinely new routes ahead of chains you already know and ones your build already blocks.
$ python scan_candidates.py \ --app commons-collections-3.2.1.jar \ --java-home $JDK --output scans/cc321 \ --profile native-core --profile modern-effects \ --collector fair --timeout 240 Preparing target classpath and rules… partial: time limit reached, complete chains kept. Labeled novel, known, blocked or constrained; clustered. Review first: scans/cc321/chains.review
See the workflow.
From archive to reviewable evidence.
WebLogic case study.
Coherence gadgets across two WebLogic builds.
WebLogic 14.1.1 GA and 15.1.1. Known CVE filter decisions and reachable sinks; no exploit payload is executed.
Built for people who report 0days.
Finding thousands of paths is easy. Deciding which ten deserve your evening is the work.
No handwritten taint config.
Callback roots, sinks, propagation and safe ignores are derived from your classpath. Gaps are reported, not guessed.
Novel, known or dead.
Every candidate is labeled against known gadget families and checked for mitigations in the scanned bytecode, so backports and shaded copies are judged by what they actually do.
Real deliverables in.
Spring Boot fat JARs and WARs are split into application and library classes. Anything the target runtime can't load is dropped and listed, so you know what was not scanned.
Built on peer-reviewed research.
Published at FSE 2026.
GadgetHunter: Region-Based Neuro-symbolic Detection of Java Deserialization Vulnerabilities
Proc. ACM Softw. Eng. 3, FSE, Article FSE003 (July 2026)
GadgetHunter splits each gadget chain into regions by analyzability: statically resolvable segments go through interprocedural taint analysis, dynamic boundaries are checked by an LLM, and each gadget's constraints are composed into SMT formulas that decide feasibility.
fewer false negatives than state-of-the-art tools on the ysoserial benchmark.
fewer false positives than the same tools, from symbolic feasibility checks.
previously unknown gadget chains discovered, and 4 recent CVEs rediscovered.
Four stages. Three need no model.
Your bytecode stays on your machine until you choose chains to analyze.
Normalize archives, index classes without loading them, and emit exact callback roots with validated sink and transfer rules.
Bounded taint search from protocol callbacks to effect boundaries. A timeout keeps complete chains and reports partial.
Label novelty, effect and mitigations, cluster equivalent routes, and write a ranked review list. Nothing is deleted.
Region-based LLM reachability and constraint extraction, solved with Z3, for the representatives you pick.
Triage that knows the ecosystem moved on.
GadgetHunter scans the exact JDK and library versions you ship, Java 8, 11, 17 or newer, and triages against what that build actually blocks.
The run below is one Java 8 target; older chains stay visible, ranked where they belong.
Main.readObject → Expression.getValueA SpEL route through application codeMultiHashMap.readObject → ServiceLoader$LazyIterator.hasNext → AccessController.doPrivileged → FileFont$CreatedFontFileDisposerRecord$1.run → File.deleteMain.readObject → RemoteObjectInvocationHandler.invoke → … → UnicastRef.unmarshalValue → ObjectInput.readObjectMain.readObject → AnnotationInvocationHandler.invoke → UIDefaults$TextAndMnemonicHashMap.get → … → Runtime.execreadObject rebuilds memberValues as a fresh LinkedHashMap (JDK 8u71+)- Novel
- No known family's core gadget
- Known
- A public family
- Blocked
- Dead in the scanned bytecode
- Constrained
- Needs more than the chain
Effect coverage without a YAML file.
Sinks are chosen from your bytecode, not a handwritten config.
Process execution, class definition, expression evaluation, JNDI, JDBC, secondary deserialization, reflection, file write and outbound request, each ranked by priority. Full signatures are in the usage guide.
Get started.
Python 3.10+ and a JDK 17+ on PATH to run the analysis.
Point --java-home at a JDK matching your target, Java 8, 11, 17 or newer, so you scan the version you actually ship. No API key until the optional analysis stage.
Install.
git clone -b modern-scanning https://github.com/MarkLee131/GadgetHunter && cd GadgetHunter python3 -m venv .venv && source .venv/bin/activate python -m pip install -r requirements.txt
Scan a deliverable.
Fat JARs and WARs are expanded automatically. Add --lib for dependencies that aren't bundled. Start with chains.review: one representative per cluster, in priority order, with every label explained in triage.json.
python scan_candidates.py --app /path/service.jar \ --java-home /path/to/target-jdk --output scans/service \ --collector fair --timeout 600 --heap-mb 6144
Analyze the best candidates.
Give the LLM and Z3 stage the review list instead of every candidate, so cost goes where new findings are likely.
cd multi-agents && export OPENAI_API_KEY=... python main.py --chains-file ../scans/service/chains.review \ --project-root /path/to/sources --batch --max-chains 50
Or use the browser workbench.
Upload archives, pick effect coverage, watch progress, and send ranked representatives to analysis. Everything runs on localhost.
python workbench.py --java-home /path/to/target-jdk --collector fair # open http://127.0.0.1:8765