arrow
Return

Source code vulnerability detection based on deep learning: a review

delete2026-01-04
delete0
delete
OA
AI
H
Huading Su
Z
Zhen Xu
Y
Yan Zhang *
Q
Qian Tan
DOI:10.1186/s42400-025-00518-7delete
deleteOriginal
deleteShare
deleteSave
View PDF
Abstract

Abstract

En 中文
Source code vulnerability detection is a crucial aspect of software security development, and the current use of Large Language Models (LLMs) accelerates not only software development but also the generation and propagation of code vulnerabilities. Traditional code vulnerability detection techniques have limited detection efficiency and accuracy. Deep learning techniques have recently gained distinct advantages in multidimensional feature extraction and large-scale data processing, and their application in code vulnerability detection is evolving from simple classification to multimodal approaches. This paper primarily systematizes and summarises deep learning-based source code vulnerability detection, as well as analyzes and anticipates current challenges and future research directions in this area. The distinction between this review and the preceding reviews: This study investigates the literature of the last four years; Not only does it contain datasets, but also includes model-related research and an analysis of multiple different application scenarios. It’s more current and comprehensive than most previous reviews of this type.
Keywords:
Software security
Source code
Vulnerability detection
Deep learning
Model interpretability

AI Summary

Brief Overview

In January 2026, Huading Su; Zhen Xu; Yan Zhang; Qian Tan published the paper "Source code vulnerability detection based on deep learning: a review" online in Cybersecurity. This research systematically reviewed the progress of applying deep learning to source code vulnerability detection over the past four years, addressing the challenge of a lack of timely, comprehensive, and cross-scenario reviews in the field. By integrating and analyzing more than 140 high-quality literature sources, it covers dataset construction, model architecture evolution, interpretability methods, and multiple real-world application scenarios, significantly enhancing the clarity of understanding regarding the current state of the technology and its bottlenecks. It provides new ideas for the research and deployment of software security automated detection tools.

Research Abstract

With the widespread adoption of AI programming tools (such as GitHub Copilot), the speed of code vulnerability generation far exceeds the capacity of manual review, while traditional detection tools suffer from high false-positive rates and significant misses. Although existing deep learning methods perform well in feature extraction, they face bottlenecks such as poor data quality (e.g., lagging CVE data, annotation bias), the difficulty of trusting model "black boxes," and weak generalization across languages and scenarios. This paper is the first to categorize vulnerability detection technologies into three major pathways: sequence models, graph models, and multimodal fusion. It compares and analyzes their adaptability logic in typical scenarios such as mobile apps, smart contracts, and AI-generated code, and points out that future breakthroughs do not lie in stacking computational power, but in enabling models to understand both syntax and business logic—for example, using program dependency graphs to simulate real execution paths, and using large models to assist in interpreting "why this code is dangerous." This provides a panoramic navigation for the industry to select suitable solutions and for academia to focus on critical issues.

Background

The core advantage of code vulnerability detection is "prevention before it is too late"; it can identify hidden defects before software is released and is widely applied in critical scenarios such as financial systems, Internet of Things devices, and government platforms. However, current mainstream tools often face a dilemma: rule-based engines (such as Fortify) are like outdated manuals that can only recognize known vulnerability patterns and are powerless against new AI-generated attacks; machine learning methods are like students guessing answers based on experience, relying on manually extracted code features and struggling to understand complex inter-function call relationships. Strategy A, although capable of quickly scanning large amounts of code, frequently produces false positives; Strategy B, although with slightly higher precision, requires repeated debugging by experts and is costly. Therefore, how to make detection systems possess the logical reasoning capabilities of human experts while efficiently handling massive code like search engines has become a key contradiction constraining software security automation.

Key Highlights

  1. Panoramic time anchors: It does not merely discuss "recent progress" in general terms, but strictly locks onto the latest achievements from 2021 to 2025, excluding outdated methods, thereby providing readers with a "vulnerability detection technology 2025 edition map."
  2. Cross-scenario penetration analysis: It goes beyond listing model performance to deconstruct the vulnerability characteristics and detection difficulties in three types of scenarios: mobile apps (Java/Kotlin), blockchain contracts (Solidity), and AI-generated code (Python/JavaScript), akin to equipping different vehicle models with dedicated maintenance manuals;
  3. Dual-track design for interpretability: It uses tools such as SHAP to quantify "which code segment has the greatest impact" (macro-level attribution) and uses techniques such as SliceLocator to pinpoint "exactly which line triggers the vulnerability" (micro-level tracking), enabling developers to see global risks clearly and repair precisely.

Summary and Outlook

Based on a systematic literature review, this study achieved a breakthrough in the panoramic understanding of deep learning vulnerability detection technology through multidimensional comparative analysis. This technology possesses the dual advantages of strong timeliness and wide scenario coverage. The results show that in AI-generated code scenarios, 35.8% of vulnerable fragments were identified, and in smart contract auditing, the detection rate for re-entrancy attacks was raised to 90.5%. This research not only solves the long-standing lack of authoritative technical roadmaps in the industry but also, by constructing a four-dimensional evaluation framework of "data—model—scenario—interpretation," provides methodological support for the security embedding of next-generation trusted AI programming assistants, open-source supply chain risk early warning, and the autonomous controllability of domestic development toolchains.

Android Source Code Vulnerability Detection: A Systematic Literature Review
err2023-01-16
err22
errOAAI
errSenanayake, Janaka; Kalutarage, Harsha; Al-Kadri, Mhd Omar; Petrovski, Andrei; Piras, Luca
errShare
errSave
Survey of source code vulnerability analysis based on deep learning
err2025-01-01
err0
errOAAI
errLiang, Chen; Wei, Qiang; Du, Jiang; Wang, Yisen; Jiang, Zirui
errShare
errSave
A Systematic Literature Review on Automated Software Vulnerability Detection Using Machine Learning
err2024-11-11
err2
errOAAI
errHarzevili, NS; Belle, AB; Wang, JJ; Wang, S; Jiang, ZM; Nagappan, N
errShare
errSave
Detecting code vulnerabilities by learning from large-scale open source repositories
err2022-09-01
err5
errOAAI
errXu, Rongze; Tang, Zhanyong; Ye, Guixin; Wang, Huanting; Ke, Xin; Fang, Dingyi; Wang, Zheng
errShare
errSave
Revisiting the Performance of Deep Learning-Based Vulnerability Detection on Realistic Datasets
err2024-08-01
err1
errOAAI
errChakraborty, Partha; Arumugam, Krishna Kanth; Alfadel, Mahmoud; Nagappan, Meiyappan; McIntosh, Shane
errShare
errSave
errShare
errSave
errShare
errSave

Journal

C
Cybersecurity
IF:
3.7
Papers:
618
Citations:
1.4K

Organization

I
Institute of Information Engineering
Scholars:
4
Papers: 2
Citations: 33
Cited Papers

Cited Papers

errShare
errSave
err
IF0
err
err0
PREAI
err
errShare
errSave
Smart contract vulnerability detection combined with multi-objective detection
err2022-11-01
err0
PREAI
errLejun Zhang; Jinlong Wang; Weizheng Wang; Zilong Jin; Yansen Su; Huiling Chen
errShare
errSave
errShare
errSave
err
IF0
err
err0
PREAI
err
errShare
errSave
Using XAI for Deep Learning-Based Image Manipulation Detection with Shapley Additive Explanation
err2022-08-05
err0
errOAAI
errSavita Walia; Krishan Kumar; Saurabh Agarwal; Hyunsung Kim
errShare
errSave
researcher View more