| International Journal of Applied Information Systems |
| Foundation of Computer Science (FCS), NY, USA |
| Volume 13 - Number 4 |
| Year of Publication: 2026 |
| Authors: E.O. Oginni, A.O. Amoo, T.O. Omodunbi, A.S. Afolayan |
10.5120/ijais02bd31ac23ec
|
E.O. Oginni, A.O. Amoo, T.O. Omodunbi, A.S. Afolayan . A Stacking Ensemble Approach for the Detection of Cross-Site Scripting and Cross-Site Request Forgery Attacks. International Journal of Applied Information Systems. 13, 4 ( Aug 2026), 51-60. DOI=10.5120/ijais02bd31ac23ec
The growing use of web-based applications has simultaneously increased vulnerability to security attacks, in particular Cross-Site Scripting (XSS) and Cross-Site Request Forgery (CSRF), which are among the most common online vulnerabilities. In this research, a stacking ensemble approach was used to detect XSS and CSRF attacks using structured web request data, with labelled datasets of normal and malicious web traffic obtained via publicly available GitHub repositories. It integrates three different base learners, such as the Random Forest (RF), Support Vector Machine (SVM), and Multilayer Perceptron (MLP) and uses an XGBoost meta-learner to boost the probabilistic outputs of the base learners to improve the detection results. The proposed model is a combination of heterogeneous classifiers, which improves the detection accuracy and robustness. The experimental results reveal that the stacking ensemble model is an effective solution for detecting web attacks and is more effective than the base learners. The model had an accuracy of 95%, and had a precision of 95%, showing increased detection reliability and a reduced false positive rate. Moreover, it has a high discriminative ability as it has an ROC-AUC score of 0.9808. The results highlight the importance of the stacking ensemble approach in enhancing the robustness and stability of machine learning-based software systems for protecting web applications from XSS and CSRF attacks. This study focuses on XSS and CSRF vulnerabilities and the application of stacking ensemble learning in the detection of attacks on web applications.