Detecting Cross-Site Scripting (XSS) Using Machine Learning & Deep Learning
Main Article Content
Abstract
Cross-Site Scripting(XSS) is a critical vulnerability in web applications, in which attackers inject malicious scripts to compromise user data. In this paper, we highlight how cross-site scripting can be detected using various machine learning models like SVM, Logistic Regression, Random Forest, Naive Bayes, Gradient Boosting and deep learning LSTM model. Our findings show that the proposed models significantly enhance the accuracy of detecting malicious scripts, achiev-ing an accuracy of 89%. These methods provide an enhanced security to protect user data by detecting malicious scripts. Our findings offer insights in deploying a layered security approach against cross-site scripting for real world applica-tions. Future work will focus on using hybrid models for better accuracy and also more variety of datasets. Reinforcement learning could be explored for detection capabilities.