PathConFuzz: Constraint-Guided Fuzzing via Path Analysis for Web Applications

Xiarun Chen, Jiaxing Xu, Chenhui Cui, Chunrong Fang, Wenjun Wu, Weiping Wen, Tao Li, Rubing Huang, Tsong Yueh ChenarXiv 2026

TL;DR

Finding security bugs in web applications is like trying to pick a lock in the dark: standard fuzzers throw random inputs at the door, while static analyzers just hand you a blueprint of where the locks might be. PathConFuzz bridges this gap by pairing static analysis (CodeQL) with fine-tuned language models to extract the exact "rules of the lock"—structured, reusable path constraints—and feeding them into a dynamic fuzzer. The result? It confirms more vulnerabilities faster than existing tools and coding agents, uncovering 17 previously unknown bugs (16 with assigned CVEs) in real-world Java web apps.

What Problem Does This Paper Address?

Modern server-side web applications don't just take simple strings; they expect structured JSON or XML, specific HTTP methods, valid session states, and inputs that survive layers of regexes, type checks, and custom sanitizers.

Because of this, traditional mutation-based fuzzers waste most of their time generating invalid requests that get rejected at the front door. Static taint analysis can trace how untrusted user input could flow to a sensitive operation (a "sink"), but static reachability doesn't prove a bug is actually exploitable—it doesn't tell you what concrete HTTP request will bypass a check or survive a sanitizer. Meanwhile, throwing general-purpose LLMs directly at web fuzzing often leads to hallucinated constraints, broken CodeQL queries, or brittle one-off test scripts.

Fig. 1. Motivating example based on CVE-2022-22978. Static analysis identifies the security-relevant au- thorization path, while constructing a triggering request requires combining request-processing behavior, regular-expression semantics, and application control logic. A vulnerability finding is reported only when executing the resulting request confirms the expected bypass.

As illustrated in the motivating example above (based on CVE-2022-22978), knowing that a URI reaches an authorization check isn't enough. Triggering the bypass requires jointly understanding container URI decoding (%0a becoming \n), regex engine behavior (missing DOTALL), and the fallback authorization branch—and then proving it against a live server.

Methods

PathConFuzz turns static candidate paths into verified runtime exploits through a three-stage pipeline:

Fig. 2. Overview of PathConFuzz. Two task-specific models support targeted path discovery and path-level semantic analysis; constraint-guided testing produces findings supported by code locations and runtime evidence.
  1. Targeted Path Discovery: PathConFuzz enumerates supported vulnerability types and uses a task-specific, fine-tuned query-generation model (qwen-7b(FL)) to write CodeQL queries. Running these queries against the target Java application's CodeQL database yields candidate source-to-sink paths.
  2. Path-Level Semantic Analysis: For each candidate path, PathConFuzz builds a compact path slice containing only the relevant data-flow, call bindings, and branch guards (preserving whether a branch must evaluate to true or false). A second fine-tuned constraint-inference model (qwen-7b(FL)) reads this slice and outputs structured JSON constraints across three categories:
  3. Value Constraints: data types, lengths, formats, and syntactic context closures (e.g., SQL quotes).
  4. Legitimacy Constraints: required headers/tokens, keyword blacklists, and sanitization/decoding order.
  5. Functional Constraints: HTTP methods, parameter locations, multi-request state dependencies, and observable response behaviors. Paths that fail schema checks or are classified as non-vulnerable ("None") are filtered out.

  6. Constraint-Guided Testing: A fixed LLM mapping backend (gpt-5.6-terra) translates the retained constraints into a reusable fuzzing configuration—a token dictionary, mutation rules, cross-field relations, ordered request templates, and deterministic verification oracles. Execution backends (WFuzz or ZAP) then run these configurations against the live application. A vulnerability is only reported when dynamic execution confirms a concrete security effect.

Datasets

To train and evaluate the framework, the authors built and used several datasets:

  • Path-Constraint Dataset (New): 1,802 manually verified Java program paths—302 vulnerable paths from CVE-associated apps (spanning 8 CWEs including SQLi, XSS, RCE, CSRF, DoS, deserialization, command execution, and path traversal) and 1,500 non-vulnerable paths. Constraint extraction is evaluated on 360 paths split evenly across Simple, Medium, and Complex tiers.
  • Query Corpus (New): 1,838 distinct CodeQL queries (794 official Java queries, 1,024 controlled program–query pairs, and 20 real-project queries) yielding 2,720 supervised training records, with 192 Source and CWE tasks held out for evaluation.
  • Detection Benchmarks: A main benchmark of 5 open-source Java web projects (CicadasCMS, JPress, OFCMS, PerfreeBlog, JFinal CMS) with 72 reference vulnerabilities, plus an extended benchmark of 10 Java subjects with 21 reference vulnerabilities.

Key Insights and Ideas

  • Reusable rules beat one-off requests: Retaining inferred path conditions as structured fuzzing rules rather than asking an LLM to generate individual HTTP requests directly boosted confirmed vulnerabilities from 44.2 to 53.2 under the exact same gpt-5.6-terra model.
  • Small, fine-tuned models outperform frontier giants: Task-specific fine-tuning of a local 7B model (qwen-7b(FL)) achieved 87.59% F1 on constraint extraction and a 68.23% valid-query rate—handily beating general-purpose frontier models like gpt-5.6-terra (61.74% F1, 56.77% valid-query rate) and claude-opus-5 (45.00% F1, 20.31% valid-query rate).
  • State and cross-field relations matter most: Ablation studies showed that removing state and request functionality caused the steepest drop in confirmed vulnerabilities (from 60.4 down to 45.6).
  • Targeted depth beats raw coverage: PathConFuzz confirmed more vulnerabilities than MioHint (60.4 vs. 49.6) despite achieving slightly lower branch coverage (61.43% vs. 65.08%), showing that aiming at vulnerability-relevant states is more effective than chasing broad coverage.

Key Results

  • Constraint Extraction & Query Generation: Fine-tuning qwen-7b into qwen-7b(FL) jumped constraint-extraction F1 from 43.19% to 87.59% and valid CodeQL query generation from 35.94% to 68.23% (with the fastest mean response time at 12.86s).
  • Main Benchmark (5 Projects, 72 Reference Vulnerabilities): PathConFuzz (qwen-7b(FL) + WFuzz) confirmed 60.4 vulnerabilities (averaged over 10 runs) in 12,699.24 seconds using 3.77M tokens. It outperformed specialized fuzzers like WDFuzz (54.2 vulns, 19,710.82s) and Magneto (50.6 vulns, 34,994.05s), as well as autonomous coding agents Claude Code (22.4 vulns, 14.45M tokens) and Codex CLI (26.8 vulns, 13.46M tokens).
  • Extended Benchmark (10 Projects, 21 Reference Vulnerabilities): Confirmed 20 of 21 vulnerabilities, surpassing WDFuzz (17) and Magneto (16).
  • Real-World Impact: Discovered 17 previously unknown vulnerabilities in open-source Java projects, 16 of which have been assigned CVE identifiers.

Limitations and Future Work

The authors note three main limitations: static analysis can still miss relevant paths (incomplete path discovery), constraint inference remains harder on Complex paths with deep Boolean nesting, regexes, or cross-function/cross-request dependencies, and dynamic verification is limited by the scope of configured runtime oracles. Future work will focus on improving constraint recovery for complex paths and expanding evaluation to a broader range of applications.

Summary updated

BibTeX
@misc{chen2026pathconfuzz,
  author = {Xiarun Chen and Jiaxing Xu and Chenhui Cui and Chunrong Fang and Wenjun Wu and Weiping Wen and Tao Li and Rubing Huang and Tsong Yueh Chen},
  title = {{PathConFuzz: Constraint-Guided Fuzzing via Path Analysis for Web Applications}},
  year = {2026},
  eprint = {2612.05131},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2612.05131},
}
Figure