Artificial Intelligence (AI) is transforming all of the technologies we use every day. More than ever, we are very near to the objective of vehicle autonomy, which has long been desired. Large automakers are also spending billions of dollars on the development of autonomous vehicles (AVs). Among the advantages of this new technology are the possibility for increased passenger safety, less congested roads, reduced traffic, optimized traffic, reduced fuel consumption, less pollution, and improved travel experiences. However, there are also new security and privacy problems associated with this paradigm change. Previously simple mechanical devices, vehicles are today computerized, networked, and intelligent. They gather vast amounts of data, which must be shielded from intrusions. In this paper, we examine privacy issues and security hurdles in AVs. We investigate several attacks using a layer-by-layer methodology. It summarizes the contributions of these research works and categorizes them based on application domains. It also identifies open problems and research challenges that need to be addressed to fully realize the potential of AI in advancing V2X systems. Our intention is to provide insights into the unresolved research issues surrounding AVs and to suggest future lines of inquiry.