Introduction
Detecting security vulnerabilities in modern codebases is a persistent challenge. Traditional Static Application Security Testing (SAST) tools are efficient but often produce high false-positive rates due to their inability to grasp complex code semantics. Conversely, Large Language Models (LLMs) demonstrate impressive semantic reasoning but struggle with hallucinations, limited context windows, and structural rigor when analyzing multi-file projects.
VulSolver bridges this gap by treating vulnerability detection as a structured constraint-solving problem. By combining the systematic path-finding of SAST with the deep semantic understanding of LLMs, VulSolver mimics a human auditor's workflow: tracing paths from data sources to dangerous sinks and verifying security constraints at every step.
The VulSolver Framework
VulSolver decomposes the detection process into two primary constraint types: Transfer Constraints, which verify if a sink is reachable from a source, and Trigger Constraints, which determine if the input reaching the sink satisfies exploit conditions (e.g., path traversal sequences).
Code Information Summary
To manage complexity, VulSolver first generates a "Code Information Summary." This summary represents the execution path as a graph, identifying the main path from source to sink and the relevant "branch" methods that might influence data state along the way.
Stepwise Constraint Solving
Instead of processing entire files, VulSolver employs a "divide and conquer" strategy through stepwise subtasks. This involves three key components:
- Branch Method Analysis: The LLM summarizes the behavior of auxiliary functions (branch methods) into simple semantic statements, preventing context overflow.
- Context Maintenance: The system prunes irrelevant variables and simplifies program state as it moves along the call chain, ensuring the LLM only processes data strictly necessary for the current "hop."
- Stepwise Resolution: The framework iterates through the call path method-by-method, passing refined context to subsequent steps.
Evaluation and Key Results
The researchers evaluated VulSolver against the OWASP Benchmark and real-world open-source projects like PublicCMS and JeeWMS.
- Benchmark Performance: On the OWASP benchmark, VulSolver achieved 97.85% accuracy and a 100% recall rate, significantly outperforming traditional tools like CodeQL (~56% accuracy).
- Real-World Impact: The framework successfully identified 15 previously unknown high-severity vulnerabilities (CVSS scores 7.5–9.8) in popular open-source repositories.
- Ablation Insights: The study highlighted that "Branch Analysis" is critical; removing it caused precision to plummet from 96% to 59%, proving that semantic summarization is essential for reducing false positives.
Conclusion and Future Work
VulSolver demonstrates that LLMs are most effective when deployed as logical solvers within a structured framework rather than generic classifiers. While highly effective, the system currently depends on the initial paths provided by SAST tools and involves higher computational costs than traditional scanners. Future work aims to expand support beyond Java to languages like C++ and Python, further refining the automated auditing process.
Summary updated