SQL Injection Attack Detection in Web Applications Using Machine Learning Algorithms

One of the major threats to the security of web applications continues to be the SQL injection (SQLi), which allows the attackers to modify the database query for illegal data access. Traditional SQL injection detection techniques, e.g., rule- or signature-based detection methods, have often failed to catch up with the evolution of attack patterns. To remedy this shortcoming, we propose a machine learning-based detection system, using Random Forest (RF) and XGBoost (XGB) models, to classify SQL queries into either benign or malicious. In our methodology, we perform feature extraction using TF-IDF (Term Frequency-Inverse Document Frequency), balance the data with SMOTE (Synthetic Minority Over-Sampling Technique), and apply hyperparameter tuning using GridSearchCV. In addition, we employ a voting classifier to combine the advantages of both RF and XGB for enhanced detection accuracy and robustness. Experimental results on the modified SQL injection dataset have shown that the combined model achieves an accuracy of 99.46%, while being more stable and generalizable than the individual models. Moreover, for enhancing security in real-world applications, we incorporate multi-factor authentication (MFA) and automated alerting mechanisms. This work tells us that the combination of these ensemble learning techniques can tremendously improve SQL injection detection by lowering false positives and false negatives.

Authors

Institutions

Publication Details

Published
2025-04-24
DOI
https://doi.org/10.1109/icoei65986.2025.11013708
Primary Topic
Network Security and Intrusion Detection
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

SQL Injection Attack Detection in Web Applications Using Machine Learning Algorithms

Kevin France, Saravanan Tamilselvan
Network Security and Intrusion Detection
article

SQL Injection Attack Detection in Web Applications Using Machine Learning Algorithms

Kevin France, Saravanan Tamilselvan
article en

Abstract

One of the major threats to the security of web applications continues to be the SQL injection (SQLi), which allows the attackers to modify the database query for illegal data access. Traditional SQL injection detection techniques, e.g., rule- or signature-based detection methods, have often failed to catch up with the evolution of attack patterns. To remedy this shortcoming, we propose a machine learning-based detection system, using Random Forest (RF) and XGBoost (XGB) models, to classify SQL queries into either benign or malicious. In our methodology, we perform feature extraction using TF-IDF (Term Frequency-Inverse Document Frequency), balance the data with SMOTE (Synthetic Minority Over-Sampling Technique), and apply hyperparameter tuning using GridSearchCV. In addition, we employ a voting classifier to combine the advantages of both RF and XGB for enhanced detection accuracy and robustness. Experimental results on the modified SQL injection dataset have shown that the combined model achieves an accuracy of 99.46%, while being more stable and generalizable than the individual models. Moreover, for enhancing security in real-world applications, we incorporate multi-factor authentication (MFA) and automated alerting mechanisms. This work tells us that the combination of these ensemble learning techniques can tremendously improve SQL injection detection by lowering false positives and false negatives.

Hindustan Institute of Technology and Science (IN)
Openalex Percentile: Top 88%
Network Security and Intrusion Detection
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.

SQL Injection Attack Detection in Web Applications Using Machine Learning Algorithms — Kevin France, Saravanan Tamilselvan · (2025) | TGRS Research Map | TGRS