This paper examines the crucial link between corporate governance and cybersecurity risk assessment within the realm of environmental sustainability. With the rise in cyberattacks, organizations face significant challenges in protecting sensitive ESG-related data. The integration of machine learning (ML) into cybersecurity offers new opportunities for improving risk management and preventing data breaches. The study introduces frameworks like the MEREC-K-means method to assess cybersecurity risks in environmental contexts, demonstrating how ML models can identify vulnerabilities and enhance resilience in sustainability efforts. By analyzing industry-specific data, the research identifies key cybersecurity threats and provides strategic recommendations for aligning sustainability and cybersecurity goals. The findings highlight the importance of board oversight in ensuring that cybersecurity strategies support environmental objectives, protecting ESG performance from emerging cyber threats. This paper adds to the growing body of literature on using ML to safeguard sustainability, offering insights on mitigating cyber risks while advancing environmental goals.