Modern vehicles have lots of connectivity, this is the reason why protect in-vehicle network from cyber-attacks becomes an important issue. The Controller Area Network is a de facto standard for the in-vehicle network. However, lack of security features of CAN protocol makes vehicles vulnerable to attacks. The message injection attack is a representative attack type which injects fabricated messages to deceive original Electronic Control Units or to cause malfunctions. In this paper we propose a method able to detect four different type of attacks targeting the CAN protocol adopting fuzzy algorithms. We obtain encouraging results with a precision ranging from 0.85 to 1 using the fuzzy NN algorithm in the identification of attacks targeting CAN protocol.