# A Robust Machine Learning Model for Detecting XSS Attacks on IoT over 5G Networks  
[PERSON]  
1 Department of Cybersecurity, Science and Information Technology, Irbid National University,  
Irbid 21110, Jordan; [EMAIL_ADDRESS] or [EMAIL_ADDRESS]  
[PERSON]  
2 Department of Information Technology, Faculty of Prince Al-Hussien [PERSON], Hashemite University,  
Zaraq 13133, Jordan; [EMAIL_ADDRESS] (R.A.); [EMAIL_ADDRESS] (A.A.); [EMAIL_ADDRESS] (M.A.) [PERSON]  
2 Department of Computer Science, Faculty of Information Technology, Zarqa University,  
security challenges necessitates a coordinated effort among stakeholders to develop resilient 5G networks that can fully realize the potential benefits of this emerging technology. In particular, 5G technology provides faster speeds, enhanced connectivity, and a wider range of frequencies, which increases bandwidth and supports a larger number of mobile devices [5; 12]. Although 5G networks have enhanced connectivity, concerns about data security and user privacy have increased due to the high speed and low latency. According to [13], there is a greater chance of unauthorized parties accessing sensitive material due to the large amounts of data generated and transmitted over these networks [14]. Base stations and edge servers are among the critical network components that have vulnerabilities that increase these risks because adversaries can use these flaws to access user data without authorization [15]. This risk is heightened by the complex relationships between systems and devices in 5G networks [16]. Furthermore, major concerns about potential data misuse, such as illegal data sales, user profiling, and surveillance, are raised due to the massive data collection of IoT devices using 5G networks [17]. Recent studies on deep learning-based attack detection for Android devices underscore the need for efficient, adaptive security solutions in resource-constrained environments, which further highlights the importance of tailored detection mechanisms for IoT security [18], while these studies focus on Android malware detection, they emphasize the broader challenges of securing resource-constrained devices and provide a foundation for addressing threats in other domains, such as IoT systems [19]. Among the various security threats facing IoT devices on 5G networks, Cross-Site Scripting (XSS) attacks pose a particularly significant risk [20]. These attacks exploit vulnerabilities within web applications connected to the network, allowing attackers to manipulate the behavior of IoT devices and potentially gain unauthorized access to sensitive data or control over the system [21]. The repercussions of XSS attacks on IoT devices can be severe, leading to unauthorized device manipulation, data breaches, privacy violations, and even potential physical harm or safety risks [22]. The increased speed and capacity provided by 5G networks further amplify the potential impact of XSS attacks, highlighting the critical need for the development of robust security measures and proactive defense strategies to effectively mitigate these threats [23]. To address the rising threats, our research focuses on addressing Cross-Site Scripting (XSS) attacks on IoT systems operating within 5G networks. The main goal of this study is to enhance the accuracy and efficiency of detecting such threats in IoT systems due to the potential severity of XSS attacks. To accomplish this, we propose an effective machine learning-based approach specifically tailored to identify and mitigate XSS attacks. This approach involves analyzing data packets transmitted within the system to recognize and detect XSS attacks, providing a robust defense mechanism against this prevalent cybersecurity threat in the rapidly evolving IoT landscape.