Designing an Integrated System for SQL Injection Detection and Prevention Using a Machine Learning-Based Web Exploration Application

Structured Query Language (SQL) injection is one of the most prevalent and pernicious web application security issues that can lead to unauthorized data access, modification and loss. While Machine Learning (ML) approaches have shown promise in detecting SQL injection attacks, many existing studies exhibit significant shortcomings. These limitations often include a lack of integration into real-time web applications for evaluation, a failure to update datasets with new or unseen user inputs and feature engineering that does not always consider all tokens, including special characters crucial for identifying injection syntax. This paper presents the design, development and evaluation of an integrated system that addresses these gaps by detecting and preventing SQL injections using a robust ML model integrated within an exploratory web application. Several ML models, including Multinomial Naïve Bayes, Random Forest Classifier and AdaBoost Classifier, in combination with different data vectorization methods like CountVectorizer and TfidfVectorizer, have all been evaluated. Based on the analysis of the results, the Random Forest Classifier paired with TfidfVectorizer, which considers all tokens, achieved the highest accuracy of 99.10%. This model serves as the core of our SQL injection detection system, which is uniquely integrated into a real-time web application to assess its performance with various user inputs. The successfully implemented system demonstrates its effectiveness by detecting malicious inputs and preventing the execution of injected SQL queries in a live environment.

Authors

Institutions

Publication Details

Journal
International Journal of Information Technology & Decision Making
Published
2025-11-20
DOI
https://doi.org/10.1142/s0219622026500239
Primary Topic
Web Application Security Vulnerabilities
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Designing an Integrated System for SQL Injection Detection and Prevention Using a Machine Learning-Based Web Exploration Application

Mahdi H. Miraz, Yu Gan, Mohammad Arif Sobhan Bhuiyan, Teh Jia Yew et al.
International Journal of Information Technology & Decision Making
Web Application Security Vulnerabilities
article

Designing an Integrated System for SQL Injection Detection and Prevention Using a Machine Learning-Based Web Exploration Application

Mahdi H. Miraz, Yu Gan, Mohammad Arif Sobhan Bhuiyan, Teh Jia Yew, Maaruf Ali, Saad Ahmed Sazan
article en

Abstract

Structured Query Language (SQL) injection is one of the most prevalent and pernicious web application security issues that can lead to unauthorized data access, modification and loss. While Machine Learning (ML) approaches have shown promise in detecting SQL injection attacks, many existing studies exhibit significant shortcomings. These limitations often include a lack of integration into real-time web applications for evaluation, a failure to update datasets with new or unseen user inputs and feature engineering that does not always consider all tokens, including special characters crucial for identifying injection syntax. This paper presents the design, development and evaluation of an integrated system that addresses these gaps by detecting and preventing SQL injections using a robust ML model integrated within an exploratory web application. Several ML models, including Multinomial Naïve Bayes, Random Forest Classifier and AdaBoost Classifier, in combination with different data vectorization methods like CountVectorizer and TfidfVectorizer, have all been evaluated. Based on the analysis of the results, the Random Forest Classifier paired with TfidfVectorizer, which considers all tokens, achieved the highest accuracy of 99.10%. This model serves as the core of our SQL injection detection system, which is uniquely integrated into a real-time web application to assess its performance with various user inputs. The successfully implemented system demonstrates its effectiveness by detecting malicious inputs and preventing the execution of injected SQL queries in a live environment.

International Journal of Information Technology & Decision Making
University of South Wales (GB), Xiamen University Malaysia (MY), Universiteti Metropolitan Tirana (AL), University of Wales Trinity Saint David (GB)
Openalex Percentile: Top 51%
Web Application Security Vulnerabilities
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.