SQLShield: Leakage-resistant SQL Injection Detection with Fine-tuned CodeBERT, Classical Baselines, and Cross-source Evaluation

High benchmark accuracy in SQL injection (SQLi) detection can mislead when preprocessing leakage, nearduplicate variants, baseline representation, and source shift are left uncontrolled.SQLShield is a leakage-resistant evaluation framework comparing fine-tuned CodeBERT and BERT-base against four word-level and two characterlevel TF-IDF baselines on a 56,621-query corpus partitioned by normalized-text group.On the fixed 5,654-query test set, CodeBERT reaches 99.95% accuracy (95% Wilson CI: 99.84-99.98)with three errors, but a character 3-5-gram LinearSVC reaches 99.84% with nine at a fraction of the training cost, and the paired difference is not statistically significant (exact McNemar p=0.109375).Across three independent group-aware partitions the ordering of the leading models is unstable: the six-error gap falls to zero at one partition, and BERT-base and the character baseline change places.On overlap-free cross-source residuals all eight models fail in one direction, at balanced accuracy between 0.501 and 0.559, while the direction that does transfer separates them by an order of magnitude in false positives on the same residual: 5 for the character baseline, 128 for BERT-base and 769 for CodeBERT.Performance survives near-duplicate family consolidation down to Jaccard 0.7.Cross-source transfer is sharply asymmetric: A->B retains discrimination (ROC-AUC=0.99025)whereas B->A collapses at the transferred operating point (balanced accuracy=0.5039)while retaining above-chance ranking (ROC-AUC=0.7033).Neither mixed-source benchmark accuracy nor model class alone establishes source portability.

Authors

Institutions

Publication Details

Journal
International journal of intelligent engineering and systems
Published
2026-11-17
DOI
https://doi.org/10.22266/ijies2026.1231.37
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
NOV
article

SQLShield: Leakage-resistant SQL Injection Detection with Fine-tuned CodeBERT, Classical Baselines, and Cross-source Evaluation

Loui Al Sardy, Osama K. Qtaish, Mahmoud Khalid Baklizi, Mohammad Alkhazaleh et al.
1 links
International journal of intelligent engineering and systems
Web Application Security Vulnerabilities
article

SQLShield: Leakage-resistant SQL Injection Detection with Fine-tuned CodeBERT, Classical Baselines, and Cross-source Evaluation

Loui Al Sardy, Osama K. Qtaish, Mahmoud Khalid Baklizi, Mohammad Alkhazaleh, Musab Zghoul
article en

Abstract

High benchmark accuracy in SQL injection (SQLi) detection can mislead when preprocessing leakage, nearduplicate variants, baseline representation, and source shift are left uncontrolled.SQLShield is a leakage-resistant evaluation framework comparing fine-tuned CodeBERT and BERT-base against four word-level and two characterlevel TF-IDF baselines on a 56,621-query corpus partitioned by normalized-text group.On the fixed 5,654-query test set, CodeBERT reaches 99.95% accuracy (95% Wilson CI: 99.84-99.98)with three errors, but a character 3-5-gram LinearSVC reaches 99.84% with nine at a fraction of the training cost, and the paired difference is not statistically significant (exact McNemar p=0.109375).Across three independent group-aware partitions the ordering of the leading models is unstable: the six-error gap falls to zero at one partition, and BERT-base and the character baseline change places.On overlap-free cross-source residuals all eight models fail in one direction, at balanced accuracy between 0.501 and 0.559, while the direction that does transfer separates them by an order of magnitude in false positives on the same residual: 5 for the character baseline, 128 for BERT-base and 769 for CodeBERT.Performance survives near-duplicate family consolidation down to Jaccard 0.7.Cross-source transfer is sharply asymmetric: A->B retains discrimination (ROC-AUC=0.99025)whereas B->A collapses at the transferred operating point (balanced accuracy=0.5039)while retaining above-chance ranking (ROC-AUC=0.7033).Neither mixed-source benchmark accuracy nor model class alone establishes source portability.

International journal of intelligent engineering and systemsVol. 19(12)
Friedrich-Alexander-Universität Erlangen-Nürnberg (DE), Petra University (JO), Isra University (JO)
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.

Laika access coming soon