UPM Institutional Repository

An approach for vulnerability detection in web applications using graph neural networks and transformers


Citation

Md Sultan, Abu Bakar and Zulzalil, Hazura and Osman, Mohd Hafeez and Tanko, Mohammed Yahaya (2024) An approach for vulnerability detection in web applications using graph neural networks and transformers. Journal of Theoretical and Applied Information Technology, 103 (1). pp. 257-265. ISSN 1992-8645; eISSN: 1817-3195

Abstract

The increasing complexity of software systems and rising security concerns due to open-source package vulnerabilities have made software vulnerability detection a critical priority. Traditional vulnerability detection methods, including static, dynamic, and hybrid approaches, often struggle with high false-positive rates and limited efficiency. Recently, graph-based neural networks (GNNs) have shown potential in improving vulnerability detection accuracy by representing code as graphs that capture syntax and semantics. This paper introduces a Gated Graph Neural Network (GGNN) framework that leverages multiple graph representations: Abstract Syntax Tree (AST), Data Flow Graph (DFG), Control Flow Graph (CFG), and Code Property Graph (CPG). The model uses these graph structures to detect vulnerabilities in function-level code snippets. Evaluation of our framework on the OWASP WebGoat dataset demonstrates the effectiveness of different graph representations across five major vulnerability types: command injection, weak cryptography, path traversal, SQL injection, and cross-site scripting. Experimental results show that the GGNN+CPG configuration consistently yields high recall for cryptographic weaknesses, while GGNN+CFG excels in detecting control-based vulnerabilities, such as command injections. The framework demonstrates notable enhancements in accuracy, precision, recall, and F1-score across all vulnerability types, with each graph representation contributing unique insights into code structures and vulnerability patterns. These findings highlight the potential of multi-graph GNNs in enhancing code vulnerability detection for cybersecurity applications.


Download File

[img] Text
119426.pdf - Published Version
Restricted to Repository staff only

Download (1MB)

Additional Metadata

Item Type: Article
Divisions: Faculty of Computer Science and Information Technology
Faculty of Forestry and Environment
Publisher: Little Lion Scientific
Keywords: Vulnerability detection; Graph neural networks; Software security; Web application security; Transformers in cybersecurity
Depositing User: Ms. Che Wa Zakaria
Date Deposited: 11 Sep 2025 03:50
Last Modified: 11 Sep 2025 03:50
URI: http://psasir.upm.edu.my/id/eprint/119426
Statistic Details: View Download Statistic

Actions (login required)

View Item View Item