Skip to content
Review

Enhancing Web Application Firewalls with Machine Learning for SQL Injection Detection

Aug 2026 · 0 citations · 8 references
Computer Science

TL;DR

A DistilBERT-Stacked Ensemble pipeline to improve detection efficiency and robustness while reducing false-positive and false-negative rates is designed and optimised to highlight the value of adversarial training and stacked meta-learning in building robust Web Application Firewalls for SQLi detection.

Abstract

Detecting SQL Injection (SQLi) attacks ranks among the most critical challenges in web application security. This research conducted a systematic literature review to identify the research gaps in this domain and responsively designed and optimised a DistilBERT-Stacked Ensemble pipeline to improve detection efficiency and robustness while reducing false-positive and false-negative rates. Comprehensive pre-processing and tokenisation were performed, DistilBERT embeddings were extracted, and machine-learning and ensemble classifiers were trained and ranked on accuracy, precision, recall and F1-score. The three best performers (Logistic Regression, XGBoost and SVM) were combined through a neural meta-learner to form a stacked ensemble. The ensemble was hardened with adversarial examples generated by the Fast Gradient Sign Method (FGSM) and tuned with Optuna. The optimised ensemble achieved 99.81% across all reported metrics, closely comparable to the strongest single model (DistilBERT SVM, 99.82%). On the evaluation platform used in this study (Section 3.8), the ensemble classified the full test set in 0.0136s against 1.896s for DistilBERT-SVM, an approximately 140-fold reduction in measured inference latency, while retaining 99.77% accuracy under a single-step FGSM attack. The contribution is the design and validation of a SQLi detector performing with state-of-the-art accuracy at real-time speed and with demonstrated robustness to a single-step FGSM attack, rather than a marginal gain in accuracy. Sensitivity analysis further confirmed the stability of the model. These findings highlight the value of adversarial training and stacked meta-learning in building robust Web Application Firewalls (WAFs) for SQLi detection. For open validation, the dataset, test sets and models are made available at https://github.com/mlily2024/Final-project-SQL-injection-pipeline.

View source

Similar papers

Preprint Aug 2026

Enhancing Web Application Firewalls with BERT-GNN for SQL Injection Detection

This research study has resulted in an optimised hybrid BERT-GNN pipeline with improved detection accuracy and robustness while reducing false-positive and false-negative rates.

Lilliane Linnet Musoke, A. Badii, A. Ashlam · 0 citations
#explainable ai Open access Sep 2026

A Comparative Study of Explainable (XAI) Deep and Ensemble Learning Models for a Web Application Firewall Using the FWAF Dataset

This study benchmarks machine learning (ML) and deep learning models for intrusion detection using the publicly available FWAF dataset, and emphasizes the value of balancing performance with interpretability, empowering Security Operations Centers (SOC) to validate automated decisions and foster trustworthy AI-driven w...

Fatih Ünlü, Y. Sönmez, Murat Dener · 0 citations
Open access Sep 2026

Real-Traffic Enrichment for Improved Minority Web Attack Detection in Network Intrusion Detection

This study enriches CICIDS2017 with authentic SQL Injection, Cross-Site Scripting (XSS), and Web Brute Force (WBF) traffic captured from a controlled DVWA/XAMPP environment, processed with CICFlowMeter to match the original feature space.

Zeyneb Berkat, Amina Fatima Zahra Yahiaoui, Mahfoud Aliouat et al. · 0 citations
Sep 2026

An Explainable and Efficient Ensemble Framework for Phishing Email Detection

Phishing email detection has increasingly benefited from deep neural models and transformer-based language representations. However, many operational security settings still require detectors that are transparent, low-latency, auditable, and deployable without GPU resources. This paper presents an explainable phishing...

T. Onitiju, Swapnoneel Roy, Debajyoti Mukhopadhyay · 0 citations

Mitigating Keyword Bias in Java Vulnerability Detection through Dual-Stream CodeBERT with Security Feature Engineering

A dual-stream CodeBERT architecture is presented that addresses keyword bias —by combining pre-trained Transformer representations with a 50-dimensional hand-engineered security feature vector, supported by targeted data augmentation and two-stage adversarial fine-tuning.

Arjun Khurana, Talaya Farasat, Joachim Posegga et al. · 0 citations
Open access Aug 2026

Comparative Analysis of Gradient Boosting Models for Phishing Website Detection

These findings establish Categorical Boosting's performance as strong benchmark evidence on a single public dataset; however, further validation on newer campaigns, unseen domains, adversarially obfuscated sites, and cross-dataset settings is still required to confirm its generalization capabilities.

Muhammad Hilmy Aziz, Rizky Parlika, Kartini Kartini · 0 citations

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.