In recent years, cyber-attacks have become more frequent and advanced, targeting critical infrastructure, businesses, homes, and government agencies. Detecting and preventing these attacks at the earliest stage possible is crucial to avoid serious harm, including data breaches. Researchers and experts in cybersecurity are looking to Software-Defined Networking (SDN) technologies as a solution to enhance real-time defense against cyber-attacks. SDN revolutionizes traditional networking by offering unprecedented flexibility and control over network resources, making it possible to adapt quickly to emerging threats. SDN provides logically centralized network control by separating the control plane from the data plane. This enables network programming and can block network activity when malicious movement is spotted. This paper presents a comprehensive analysis of threat vectors in SDN. It examines the various ways in which SDN networks are vulnerable to cyber-attacks, including network infrastructure, application layer, and SDN controller. The paper also evaluates the effectiveness of existing security measures and proposes future research directions to enhance SDN security. Overall, the paper highlights the potential of SDN as a powerful tool in the fight against cybercrime and emphasizes the importance of continued research and development to improve SDN security. © The Author(s), under exclusive licence to Springer Science+Business Media, LLC, part of Springer Nature 2024.