In recent years, developments in vehicle-to-everything communication (V2X) have steadily increased in applications such as platooning, collision avoidance, and routing algorithm. V2X provides vehicles with long range information regarding traffic congestion and routing, but also short and mid-range information allowing cooperative adaptive cruise control, automatic collision warnings, and others. Despite being potentially beneficial in several aspects, challenges exist from a safety and reliability standpoint due to the possibility of cyber-attacks aimed at influencing the behavior of vehicles. In this project, a cloud-based method to detect the false data injection attack on Connected Autonomous Vehicles (CAVs) is presented. The sandboxing concept utilized in this paper comes from computer security and it is recasted in a control framework as a way to isolate and evaluate the data exchanged by the CAVs affecting the vehicle control system. Numerical experiments are conducted to show the effectiveness of the approach using microscopic traffic simulation. Our results are summarized as follows: (i) both two proposed data fusion algorithms with different architecture are able to improve the localization results of CAVs; (ii) both two proposed attack detection strategies are able to detect false data injection attacks in platooning scenario and rerouting scenario, respectively.