TMC (traffic management system) is the vital unit of Intelligent Transport System (ITS) as it provides complex services by interacting with other smart devices, objects and infrastructure wirelessly. However, there is growing concern about the threat of cyber attacks against connected cars, autonomous vehicles, and Smart Roads, as attacks on these will be more highly visible, have a more immediate effect, and potentially have a disastrous impact on public safety. Code injection attacks pose a serious security threat among the Internet community. In this paper, we provide a security model on ITS against network attacks. We undertake a comprehensive requirement analysis of access control mechanisms for ITS in particular malicious code injections. We propose an innovative solution to filter the SQL and XSS injection attacks by using Snort IDS. The proposed detection technique uses Snort tool by augmenting a number of additional Snort rules. Experimental results from simulations based on Snort rules show that our techniques outperform similar existing techniques.