Automatically Learning Vulnerability Patterns for Scalable Static Analysis of Web Applications

Static analysis has been widely used to analyze web applications, yet its effectiveness largely relies on the quality of vulnerability patterns. In this work, we present MoCQ, which leverages large language models (LLMs) to automatically generate executable detection queries that capture these vulnerability patterns. To address challenges like LLM hallucinations and the complexity of industrial static analysis tools, MoCQ introduces a DSL-based harness. This harness extracts and models a core subset of domain-specific languages (DSLs) to provide the formal structure and guidance needed to generate valid queries. MoCQ employs an iterative refinement loop with trace-driven symbolic validation that provides precise feedback for query correction and optimization. Such a neuro-symbolic approach thus combines the scalability of pattern-based static analysis with the semantic understanding and automation capabilities of LLMs. We evaluated MoCQ on multiple vulnerability types across web programming languages, including Java, PHP, and JavaScript. MoCQ achieves detection performance comparable to expert-developed patterns while requiring only hours of query generation versus weeks of manual effort. Notably, MoCQ uncovered 45 new vulnerability patterns that security experts had missed and discovered 25 previously unknown vulnerabilities in real-world applications. MoCQ also outperforms prior approaches with stronger analysis capabilities.

Link
https://www.semanticscholar.org/paper/c6a8cd2f6485a34b1089a6562e33d12fc3614e2d
Found by
Semantic Scholar
Authors
Peng-Hui Li, Song-Chen Yao, J. Korich, Chang-Hua Luo, Jian-Jia Yu, Yin-Zhi Cao, Jun-Feng Yang
Categories
evaluation
Published
2026-11-14
Last seen by the radar
2026-11-15
Citations
0
Influential citations
0
Radar score
31.60 / 100 (how it is scored)
Why it scored so
Matched: evaluat; Primary record: Semantic Scholar
Related links
https://doi.org/10.1145/3830454.3846556
Is this record right? If you made this work and something here is wrong or missing, tell us what to fix.

More records found by Semantic Scholar