Comparison of Machine Learning Algorithms Used for Detecting XSS Attacks
Web security has become a critical concern due to the increasing sophistication of cyber threats, with Cross-Site Scripting (XSS) among the most prevalent attacks. Traditional rule-based detection struggles against adaptive threats, making machine learning a valuable alternative. This study evaluates the effectiveness of three machine learning models - Support Vector Machine (SVM), Logistic Regression (LR) and K-Nearest Neighbors (KNN) - for detecting XSS attacks. Experimental results indicate that SVM achieves the highest classification accuracy, efficiently distinguishing malicious from legitimate requests. LR provides a balance between performance and computational efficiency, while KNN demonstrates lower recall, limiting its effectiveness in detecting complex attacks. We emphasize the potential of machine learning in strengthening web security and improving XSS detection, with future research focusing on feature optimization and ensemble learning to improve detection accuracy.
Authors
- Felicia Mirabela Costea
- Mihaela Meze
- Octavia-Maria Bolojan
Institutions
- University of Oradea (RO)
Publication Details
- Published
- 2025-05-29
- DOI
- https://doi.org/10.1109/emes65692.2025.11045588
- Primary Topic
- Network Security and Intrusion Detection
- Type
- article
- Field-Weighted Citation Impact
- 0.00