
SQL and JSON injection attacks are still a significant security vulnerability in contemporary web applications, particularly in API-based systems. This paper introduces a new collaborative machine learning system designed to detect and mitigate SQL and JSON injection attacks in real time. The system adopts a stratified defensive approach, integrating database query analysis, behavioural scrutiny of API requests, and instantaneous anomaly detection to establish a resilient protective framework. Utilizing advanced machine learning techniques—including Support Vector Machines (SVM), Naive Bayes (NB), Decision Trees (DT), and Random Forest (RF)—it achieves high-fidelity discrimination between benign and malicious queries. Also, the system maintains dynamic response to new attack methods through real-time threat monitoring, input sanitization mechanisms, and adaptive learning strategies. The model is trained on a mixed dataset of labelled SQL and JSON injection attempts along with actual queries, which enhances its accuracy in detection. Empirical evaluations demonstrate 94% accuracy with zero false positives compared to conventional syntax-based detection mechanisms. Future improvements may involve the application of transformer-based architectures (e.g., BERT, GPT-activated detection), graph neural networks (GNNs), and reinforcement learning to enhance accuracy and responsiveness. This research highlights the need for multi-pronged security that is AI-driven to safeguard modern database systems and API infrastructures against advanced SQL-JSON injection attacks.
SQL Injection, JSON Injection, Machine Learning-based Detection, API Security, Real-time Anomaly Detection,
SQL Injection, JSON Injection, Machine Learning-based Detection, API Security, Real-time Anomaly Detection,
| selected citations These citations are derived from selected sources. This is an alternative to the "Influence" indicator, which also reflects the overall/total impact of an article in the research community at large, based on the underlying citation network (diachronically). | 0 | |
| popularity This indicator reflects the "current" impact/attention (the "hype") of an article in the research community at large, based on the underlying citation network. | Average | |
| influence This indicator reflects the overall/total impact of an article in the research community at large, based on the underlying citation network (diachronically). | Average | |
| impulse This indicator reflects the initial momentum of an article directly after its publication, based on the underlying citation network. | Average |
