Agriculture is essential due to the current and future challenges related to food that our society must face. Agriculture is a precious resource, and problems in it can lead to famine and migration crises. Smart agriculture can increase productivity and crop yield with new operating and business models. Smart agriculture relies on information and communication technology (ICT). However, a cyberattack on a country’s agricultural ICT can jeopardize an entire nation. A cyber-attack in smart agriculture refers to a malicious digital attack targeting the connected devices and systems used in modern, technologically advanced farming practices, like sensors, drones, irrigation systems, and data management platforms, potentially disrupting operations, manipulating data, or causing physical damage to crops by altering settings like irrigation levels or pesticide application. Considering the challenges and threats, this research presents a systematic literature review to address the cybersecurity in smart agriculture. The main findings on cybersecurity in smart agriculture encompass the challenges of cybersecurity in agriculture and the detection of attacks and intrusions. The main contribution of this work is the consolidation of results to identify research findings, research gaps, and trends in security vulnerabilities associated with network traffic prediction in smart agricultural systems using Machine Learning.The insights from this study provide a foundation for developing robust cybersecurity frameworks, integrating AI, blockchain, and encryption techniques to protect agricultural data and operations.