Rong Ren , Mushi Zhou , Ni Liao , Bing Zhang , Guoyan Huang , Haitao He , Qian Wang
{"title":"Vul2image: A quick image-inspired and CNN-based vulnerability detection system","authors":"Rong Ren , Mushi Zhou , Ni Liao , Bing Zhang , Guoyan Huang , Haitao He , Qian Wang","doi":"10.1016/j.eswa.2026.131468","DOIUrl":null,"url":null,"abstract":"<div><div>Given the accuracy of deep learning (DL) in image classification, some studies have applied DL algorithms to vulnerability detection by characterizing software source code as RGB images. However, effectively utilizing RGB images to store multiple code semantics remains a challenge, impacting the effectiveness of vulnerability detection. To address this, we developed Vul2image, a quick Image-inspired and CNN-based Vulnerability Detection System. By focusing on Potential Vulnerable Code Fragments (PVCFs) and their context code, Vul2image minimized interference from irrelevant information and achieved comprehensive coverage of vulnerability features. It constructed an RGB fine-grained image model incorporating textual, semantic, and structural information from code text, Control Dependency Graphs (CDGs), and Data Dependency Graphs (DDGs), resulting in improved detection efficiency. Evaluated on three datasets with increasing vulnerability types (including our self-collected, VulCNN, and Devign), Vul2image achieved the best results on our dataset, outperforming 9 classic (incl. 4 LLM-based) and 2 SOTA image-based detectors (VulCNN, VulGAI) and demonstrating performance comparable to 7 transformer-encoder-based methods, showing strong precision for specific vulnerability types. In practice, Vul2image was 35 times faster than VulCNN and successfully identified 21 reported and 5 unreported vulnerabilities in various real-world systems and software within 67,352,085 lines of code, showcasing its large-scale vulnerability detection capability.</div></div>","PeriodicalId":50461,"journal":{"name":"Expert Systems with Applications","volume":"312 ","pages":"Article 131468"},"PeriodicalIF":7.5000,"publicationDate":"2026-05-25","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Expert Systems with Applications","FirstCategoryId":"94","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S0957417426003817","RegionNum":1,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"2026/2/4 0:00:00","PubModel":"Epub","JCR":"Q1","JCRName":"COMPUTER SCIENCE, ARTIFICIAL INTELLIGENCE","Score":null,"Total":0}
引用次数: 0
Abstract
Given the accuracy of deep learning (DL) in image classification, some studies have applied DL algorithms to vulnerability detection by characterizing software source code as RGB images. However, effectively utilizing RGB images to store multiple code semantics remains a challenge, impacting the effectiveness of vulnerability detection. To address this, we developed Vul2image, a quick Image-inspired and CNN-based Vulnerability Detection System. By focusing on Potential Vulnerable Code Fragments (PVCFs) and their context code, Vul2image minimized interference from irrelevant information and achieved comprehensive coverage of vulnerability features. It constructed an RGB fine-grained image model incorporating textual, semantic, and structural information from code text, Control Dependency Graphs (CDGs), and Data Dependency Graphs (DDGs), resulting in improved detection efficiency. Evaluated on three datasets with increasing vulnerability types (including our self-collected, VulCNN, and Devign), Vul2image achieved the best results on our dataset, outperforming 9 classic (incl. 4 LLM-based) and 2 SOTA image-based detectors (VulCNN, VulGAI) and demonstrating performance comparable to 7 transformer-encoder-based methods, showing strong precision for specific vulnerability types. In practice, Vul2image was 35 times faster than VulCNN and successfully identified 21 reported and 5 unreported vulnerabilities in various real-world systems and software within 67,352,085 lines of code, showcasing its large-scale vulnerability detection capability.
期刊介绍:
Expert Systems With Applications is an international journal dedicated to the exchange of information on expert and intelligent systems used globally in industry, government, and universities. The journal emphasizes original papers covering the design, development, testing, implementation, and management of these systems, offering practical guidelines. It spans various sectors such as finance, engineering, marketing, law, project management, information management, medicine, and more. The journal also welcomes papers on multi-agent systems, knowledge management, neural networks, knowledge discovery, data mining, and other related areas, excluding applications to military/defense systems.