Zero-day vulnerabilities represent one of the most critical challenges in cybersecurity, with traditional detection methods often lagging behind exploitation. This paper presents a machine-learning framework for proactive zero-day prediction by combining static code analysis with historical vulnerability patterns. Leveraging datasets from the National Vulnerability Database (NVD), Exploit-DB, and CVE repositories, we extract hybrid features encompassing code complexity metrics (cyclomatic, Halstead), NLP-based AST embeddings, and temporal exploit trends. Evaluating ensemble models (XGBoost, Random Forest) against deep learning (LSTM), our framework achieves an F1-score of 0.86 and AUC-ROC of 0.93, outperforming prior approaches by 19 × baseline) and CVSS exploitability patterns. While effective on open-source projects, limitations emerge in proprietary software contexts, with accuracy declining by 23