Detecting software vulnerabilities using deep learning

Authors

  • Bùi Văn Công Khoa Công nghệ Thông tin, Trường Đại học Kinh tế - Kỹ thuật Công nghiệp, 456 Minh Khai, phường Vĩnh Tuy, Hà Nội, Việt Nam
  • Vũ Thảo Nguyên Trường Đại học Công nghệ Nanyang, 50 Đại lộ Nanyang, Singapore
  • Vũ Đức Minh Trường THPT Cầu Giấy, 8/118 Nguyễn Khánh Toàn, phường Cầu Giấy, Hà Nội, Việt Nam
  • Nguyễn Phương Lan Trường Quốc tế Nhật Bản, 84A Nguyễn Thanh Bình, phường Hà Đông, Hà Nội, Việt Nam

Keywords

contrastive learning, deep learning, software, vulnerabilities

DOI:

https://doi.org/10.31276/CNTT.2024.3026

Abstract

Developing software projects successful is always a top concern for organizations and enterprises.  Among these concerns, ensuring software quality is the highest priority throughout the entire development and operation process. This paper addresses the detection of source code vulnerabilities and focuses on analyzing the syntax and semantics of statements within the source code. The source code vulnerability detection model follows a structured process: (i) syntactic and semantic representation; 
(ii) feature extraction from source code; (iii) data balancing; and (iv) source code classification. The 
model’s output indicates whether the source code is normal or contains vulnerabilities. The model istrained using the SARD dataset and incorporates deep learning approaches. Specifically, it employs 
the BERT (Bidirectional Encoder Representations from Transformers) model, the Word2Vec 
model combined with LSTM (Long Short-Term Memory), and the Word2Vec model with BiLSTM 
(Bidirectional Long Short-Term Memory) across three scenarios. Classification results are passed 
through a softmax function to generate a vector containing the probability predictions for each type 
of vulnerability. The detection model achieves an accuracy rate of up to 82.63% for identifying source 
code vulnerabilities, with a corresponding omission rate of only 17.37%. This result is considered 
acceptable and demonstrates the superior effectiveness of the approach in the task of source code 
vulnerability detection.

Downloads

Download data is not yet available.

Published

2025-12-20