Reasoning with LLMs for Zero-Shot Vulnerability Detection
On the map: LLM reasoning → Reasoning for agents, planning and code
Abstract (arXiv)
Automating software vulnerability detection (SVD) remains a critical challenge in an era of increasingly complex and interdependent software systems. Despite significant advances in Large Language Models (LLMs) for code analysis, prevailing evaluation methodologies often lack the context-aware robustness necessary to capture real-world intricacies and cross-component interactions. To address these limitations, we present VulnSage, a comprehensive evaluation framework and a dataset curated from diverse, large-scale open-source system software projects developed in C/C++. Unlike prior datasets, it leverages a heuristic noise pre-filtering approach combined with LLM-based reasoning to ensure a representative and minimally noisy spectrum of vulnerabilities. The framework supports multi-granular analysis across function, file, and inter-function levels and employs four diverse zero-shot prompt strategies: Baseline, Chain-of-Thought, Think, and Think & Verify. Through this evaluation, we uncover that structured reasoning prompts substantially improve LLM performance, with Think & Verify reducing ambiguous responses from 20.3% to 9.1% while increasing accuracy. We further demonstrate that code-specialized models consistently outperform general-purpose alternatives, with performance varying significantly across vulnerability types, revealing that no single approach universally excels across all security contexts. Link to dataset and codes: https://github.com/Erroristotle/VulnSage.git
Key facts. Cited by 7 papers in the map (data through 14 Oct 2026). Placed in Reasoning for agents, planning and code, one of 17 directions in LLM reasoning. Builds on 17 of its 46 references that are in the map. First posted on arXiv 22 Mar 2025.
Builds on
17 of 46 references.
References · 17
- 2024The Llama 3 Herd of Modelscited by 14,715
- 2021Evaluating Large Language Models Trained on Codecited by 8,320
- 2025DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learningcited by 6,330
- 2023Code Llama: Open Foundation Models for Codecited by 2,139
- 2024DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligencecited by 1,181
- 2023DSPy: Compiling Declarative Language Model Calls into Self-Improving Pipelinescited by 832
- 2022Automatic Chain of Thought Prompting in Large Language Modelscited by 688
- 2025Towards System 2 Reasoning in LLMs: Learning How to Think With Meta Chain-of-Thoughtcited by 109
- 2024IRIS: LLM-Assisted Static Analysis for Detecting Security Vulnerabilitiescited by 103
- 2023Understanding the Effectiveness of Large Language Models in Detecting Security Vulnerabilitiescited by 59
- 2023How Far Have We Gone in Vulnerability Detection Using Large Language Modelscited by 27
- 2024Comparison of Static Application Security Testing Tools and Large Language Models for Repo-level Vulnerability Detectioncited by 18
5 more
- 2024VulDetectBench: Evaluating the Deep Capability of Vulnerability Detection with Large Language Modelscited by 11
- 2024VulnLLMEval: A Framework for Evaluating Large Language Models in Software Vulnerability Detection and Patchingcited by 9
- 2024A Comprehensive Survey on the Security of Smart Grid: Challenges, Mitigations, and Future Research Opportunitiescited by 4
- 2025Cyber-Physical Systems Security: A Comprehensive Review of Anomaly Detection Techniquescited by 4
- 2024INVARLLM: LLM-assisted Physical Invariant Extraction for Cyber-Physical Systems Anomaly Detectioncited by 2
Built on by
Citing papers per year: 2025: 3; 2026: 4.
7 papers.
- 2026From SFT to RL: Demystifying the Post-Training Pipeline for LLM-based Vulnerability Detectioncited by 4
- 2025Revisiting Pre-trained Language Models for Vulnerability Detectioncited by 3
- 2025A Blueprint for AI-Driven Software Quality: Integrating LLMs with Established Standardscited by 1
- 2026Three Heads Are Better Than One: A Multi-perspective Reasoning Framework for Enhanced Vulnerability Detectioncited by 1
- 2025Diverse LLMs vs. Vulnerabilities: Who Detects and Fixes Them Better?cited by 0
- 2026VulReaD: Knowledge-Graph-guided Software Vulnerability Reasoning and Detectioncited by 0
- 2026How Reasoning Shapes Social Bias in LLM-Generated Code?cited by 0
- 2026How Reasoning Shapes Social Bias in LLM-Generated Code?7 Aug 2026
- 2026Three Heads Are Better Than One: A Multi-perspective Reasoning Framework for Enhanced Vulnerability Detection18 May 2026
- 2026From SFT to RL: Demystifying the Post-Training Pipeline for LLM-based Vulnerability Detection15 Feb 2026
- 2026VulReaD: Knowledge-Graph-guided Software Vulnerability Reasoning and Detection11 Feb 2026
- 2025Diverse LLMs vs. Vulnerabilities: Who Detects and Fixes Them Better?14 Dec 2025
- 2025Revisiting Pre-trained Language Models for Vulnerability Detection22 Jul 2025
- 2025A Blueprint for AI-Driven Software Quality: Integrating LLMs with Established Standards19 May 2025
Similar, not cited
Close in wording, no citation either way
- 2026VulTriage: Triple-Path Context Augmentation for LLM-Based Vulnerability Detection
- 2024LLM4Vuln: A Unified Evaluation Framework for Decoupling and Enhancing LLMs' Vulnerability Reasoning
- 2025VulInstruct: Teaching LLMs Root-Cause Reasoning for Vulnerability Detection via Security Specifications
- 2025VulnLLM-R: Specialized Reasoning LLM with Agent Scaffold for Vulnerability Detection
- 2025SV-TrustEval-C: Evaluating Structure and Semantic Reasoning in Large Language Models for Source Code Vulnerability Analysis
- 2026Representation Matters: An Empirical Study of Program Representations for LLM Vulnerability Reasoning
- 2024To Err is Machine: Vulnerability Detection Challenges LLM Reasoning
- 2025Boosting Vulnerability Detection of LLMs via Curriculum Preference Optimization with Synthetic Reasoning Data