To address the limitations of traditional detection methods, including rule-based approaches and conventional deep learning models, which struggle to adapt to emerging attack techniques and fail to effectively capture the subtle differences and contextual dependencies of cross-site scripting(XSS) payloads, this paper proposes a fusion detection model named UBL-XSS. The model innovatively integrates three deep learning techniques including BERT, universal sentence encoder, and LSTM-based autoencoders, to capture the semantic and syntactic features of XSS payloads from multiple dimensions. Experimental results demonstrate that UBL-XSS achieves a precision of 99.95% and a recall of 99.84% on benchmark datasets, significantly outperforming the state-of-the-art detection methods discussed in this study.
SHARIFM H U. Web attacks analysis and mitigation techniques[J]. International Journal of Engineering Research & Technology (IJERT), 2022: 10-12.
[2]
USHAG, KANNIMUTHUS, MAHENDIRANP D, et al. Static analysis method for detecting cross site scripting vulnerabilities[J]. International Journal of Information and Computer Security, 2020, 13(1): 32-47.
KAURJ, GARGU, BATHLAG. Detection of cross-site scripting (XSS) attacks using machine learning techniques: a review[J]. Artificial Intelligence Review, 2023, 56(11): 12725-12769.
[5]
THAJEELI K, SAMSUDINK, HASHIMS J, et al. Machine and deep learning-based XSS detection approaches: a systematic literature review[J]. Journal of King Saud University: Computer and Information Sciences, 2023, 35(7): 101628.
ZHOUY, WANGP C. An ensemble learning approach for XSS attack detection with domain knowledge and threat intelligence[J]. Computers & Security, 2019, 82: 261-269.
[8]
TADHANIJ R, VEKARIYAV, SORATHIYAV, et al. Securing web applications against XSS and SQLi attacks using a novel deep learning approach[J]. Scientific Reports, 2024, 14: 1803.
[9]
KRISHNANM, LIM Y, PERUMALS, et al. Detection and defending the XSS attack using novel hybrid stacking ensemble learning-based DNN approach[J]. Digital Communications and Networks, 2024, 10(3): 716-727.
[10]
LEIL, CHENM, HEC, et al. XSS detection technology based on LSTM-attention[C]//2020 5th International Conference on Control, Robotics and Cybernetics (CRC). October 16-18, 2020, Wuhan, China. IEEE, 2020: 175-180.
[11]
SOHAILA, AYISHAB, HAMEEDI, et al. Deep neural networks based meta-learning for network intrusion detection[J]. arXiv preprint arXiv:2023.
[12]
PENGB T, XIAOX Y, WANGJ. Cross-site scripting attack detection method based on transformer[C]//2022 IEEE 8th International Conference on Computer and Communications (ICCC). December 9-12, 2022, Chengdu, China. IEEE, 2023: 1651-1655.
[13]
RIFATN, AHSANM, CHOWDHURYM, et al. BERT against social engineering attack: phishing text detection[C]//2022 IEEE International Conference on Electro Information Technology (EIT). May 19-21, 2022, Mankato, MN, USA. IEEE, 2022: 1-6.
[14]
LODHAS, GUNDAWARA. SQL injection and its detection using machine learning algorithms and BERT[C]//International Conference on Cognitive Computing and Cyber Physical Systems. November 26-27, 2022, Bhimavaram, Andhra Pradesh. Springer Nature Switzerland, 2022: 3-16.
[15]
AL-SMADIM, HAMMADM M, AL-ZBOONS A, et al. Gated recurrent unit with multilingual universal sentence encoder for Arabic aspect-based sentiment analysis[J]. Knowledge-Based Systems, 2023, 261: 107540.
[16]
FATTOHI E, KAMAL ALSHEREFF, EADW M, et al. Semantic sentiment classification for COVID-19 tweets using universal sentence encoder[J]. Computational Intelligence and Neuroscience, 2022, 2022: 6354543.
[17]
GARDAZIN M, DAUDA, MALIKM K, et al. BERT applications in natural language processing: a review[J]. Artificial Intelligence Review, 2025, 58(6): 166.
FANGY, LIY, LIUL. DeepXSS: Cross site scripting detection based on deep learning[C]//Proceedings of the 2018 International Conference on Computing and Artificial Intelligence. March 12-14, 2018, Chengdu, China. ACM, 2018: 47-51.
[20]
LUOJ, XUG Q. XSS attack detection methods based on XLNet and GRU[C]//2021 4th International Conference on Robotics, Control and Automation Engineering (RCAE). November 4-6, 2021, Wuhan, China. IEEE, 2021: 171-175.