Manuscript Offprint

arXiv:2609.09402

X-amine509: Predicting the Practical Risk Level of Enterprise X.509 Certificates

Cameron Keith, Shubh Patel, JD Kilgallin, Caleb Shorter

Cameron Keith

Analytics and AI Team

Keyfactor

Hanover, NH

Shubh Patel

Analytics and AI Team

Keyfactor

Cleveland, OH

JD Kilgallin ∗^{*}

Analytics and AI Team

Keyfactor

Cleveland, OH

Caleb Shorter

Analytics and AI Team

Keyfactor

Cleveland, OH

cameron.s.keith.gr@dartmouth.edu shubh.patel@keyfactor.com jd.kilgallin@keyfactor.com caleb.shorter@keyfactor.com

Abstract—Enterprises managing large X.509 certificate inventories face a prioritization problem: deterministic analysis tools that precisely identify standards violations are indispensable for remediation, but applying them exhaustively across millions of certificates is operationally impractical. We present X-amine509, a two-stage triage system that uses machine learning to rapidly rank certificates by predicted risk and route only the highest-risk items to full deterministic analysis. Certificate risk is quantified as a composite score derived from 177 defect checks grounded in CA/Browser Forum Baseline Requirements, NIST IR 8547/SP 800-57, and cryptographic strength criteria, weighted by security severity across four tiers ranging from cryptographic breaks to minor compliance deviations. We collected 1,027,714 X.509 certificates from Fortune 500, .gov, and .edu domains and scored each using this rubric. On a held-out test set of 201,976 certificates, our best model (Extra Trees) achieves R2R^{2} of 0.993 with MAE of 2.26, while Decision Tree scores R2R^{2} of 0.986 at 3.7 million certificates per second on a single machine. Ranking quality confirms the triage value: aggregate NDCG exceeds 0.997, and severity-tier classification reports 99.76% accuracy with 98.90% recall on critical-tier defects. Thirteen months later, we retrieved another 571,374 certificates to test our models' durability over time, and the Extra Trees and Decision Tree models maintain MAE below 6.8, R2R^{2} of at least 0.915, aggregate NDCG above 0.988, severity-tier accuracy of at least 99.52%, and critical-tier recall of at least 97.03%. Feature importance analysis identifies validity period, Extended Key Usage configuration, negative serial number encoding, and self-signed status as the strongest risk predictors, providing coarse interpretability at the triage stage.

Index Terms—Machine Learning, PKI, Risk, X.509, Certificate, Triage, Feature Engineering, Random Seed Optimization, NDCG, Hyperparameter Tuning

1. Introduction

X.509 certificates are foundational to Internet security, because they enable authenticated key exchange in protocols such as TLS, which in turn protects the confidentiality and integrity of communications. An X.509 public key certificate is “a set of data that uniquely identifies a public key (which has a corresponding private key) and an owner that is authorized to use the key pair. The certificate contains the owner’s public key and possibly other information and is digitally signed by a Certification Authority (i.e., a trusted party), thereby binding the public key to the owner” [1]. Certificates play a vital role, but misconfigured or weak certificates can expose enterprises to serious cybersecurity risks. High-profile incidents stemming from improperly configured or compromised certificates underscore the urgent need for effective risk assessment. For example, between 2015 and 2017, Symantec and its Registration Authority (RA) partners were caught issuing SSL/TLS certificates without proper domain ownership validation, including unauthorized Extended Validation certificates for Google-owned domains. Google’s Certificate Transparency (CT) logs revealed that up to 30,000 certificates had been improperly issued across four RA partners that Symantec had failed to adequately audit. In response, Google Chrome and Mozilla Firefox executed a phased distrust of all Symantec-issued certificates by October 2018, which forced DigiCert (which acquired Symantec’s CA business) to replace millions of certificates across the web [2]. In another example, the Equifax breach in 2017 was exacerbated by an expired SSL certificate [3]. In addition, malicious AI tools and probes are becoming more sophisticated and automated, and are able to identify and exploit many of these weaknesses [4].

We identified four main categories of risks associated with X.509 certificates:

  • Public Key Infrastructure (PKI) Chain Issues: Chain validation failures, such as missing intermediate certificates, path length constraint violations, untrusted or unknown root CAs, and revoked certificates within the chain, undermine the CA trust architecture. These defects correspond to specific checks in x509lint [5] and RFC 5280 [6] chain validation requirements. When a chain certificate is compromised, attackers can access protected systems without authorization, inject malware, and collect sensitive consumer and enterprise data, leading

∗^{*}Corresponding author: jd.kilgallin@keyfactor.com to severe financial losses, government investigations, and heavy fines.

  • Key Compromise: A certificate with a weak key is a critical vulnerability, because attackers can run a MITM attack, harvest credentials, or spoof trusted services.

  • Invalid Content: The certificate structure or content is unusable for the intended purpose.

  • Visible Negligence: These certificates fail to meet established best practices and call into question the trustworthiness of the PKI that issued them.

PKI administrators protect a hierarchy of cryptographic assets with varying criticality. The most critical is the certificate authority's (CA) private key, because compromise of this key allows an attacker to issue fraudulent certificates and undermine the entire trust hierarchy. Code-signing keys carry the next-highest impact, since a compromised code-signing key lets an attacker distribute signed malware that appears legitimate. Individual website certificate keys are lower-impact per certificate but far more numerous, making them a significant aggregate concern.

Certificates issued for phishing or spoofing domains represent a distinct category. These certificates are not issued by the enterprise, do not appear in the organization's certificate inventory, and require different response actions such as customer notification and domain takedown rather than certificate revocation. While phishing certificates may pose risks to an organization's customers, they do not reflect the security posture of the enterprise's own PKI operations.

Despite this distinction, most academic research on X.509 certificate risk focuses on phishing and malware classification, leaving practitioners without ML-assisted tools for prioritizing remediation across large enterprise certificate inventories. The methodological insights from phishing-focused work nonetheless inform our approach to building an enterprise risk model.

Traditional approaches to evaluate certificate risk depend on deterministic checks: static analyses of certificate attributes such as expiry dates, cryptographic algorithms, and adherence to standards. Online tools like Bad Keys [7] and CRT [8] provide user interfaces to check individual certificates for issues. While these deterministic checks are reliable for any individual certificate, at enterprise scale, the economics shift substantially. The Keyfactor PKI & Digital Trust Report [9] reports that the average large enterprise manages 81,139 internally trusted certificates, with the largest organizations managing hundreds of thousands or more. In our experiments, deterministic analysis of 1,027,714 certificates required over 24 hours on comparable hardware, corresponding to approximately 0.1 seconds per certificate. At this rate, a 10-million-certificate enterprise would require approximately ten days of continuous single-threaded analysis. The CA/Browser Forum's approved transition to 47-day maximum certificate validity [10] will cause certificate populations to turn over faster, compounding this assessment burden.

These timescales conflict with operational requirements: quarterly compliance reviews must leave time for remediation after assessment, and incident response (such as identifying certificates affected by a newly disclosed CA compromise) demands inventory-wide triage in hours, not weeks. The question is not whether deterministic analysis is feasible given sufficient time and hardware; it is whether organizations should expend compute-days exhaustively analyzing a certificate population that is overwhelmingly compliant when ML triage can rank the entire inventory in seconds and direct deterministic resources to the certificates most likely to warrant investigation. In our dataset, over 80% of certificates had zero identified risk factors; investing deterministic cycles to confirm this absence is the inefficiency that triage addresses.

We address this gap by introducing a two-stage triage framework: a fast ML model ranks certificates by predicted risk, and deterministic tools then provide detailed, explainable assessment starting from the top of the ranked list. The ML model does not replace deterministic analysis; it prioritizes the order in which certificates receive it. All actionable reports, including specific rule violations and remediation guidance, come from the deterministic checker. Practitioners receive the same detailed explanations they expect; they simply receive the most critical reports first. A fast, well-aligned model turns easily observed certificate attributes into a proxy for a full suite of deterministic assessments, providing a practical path to manage compute costs while surfacing risk and raising the baseline of PKI hygiene in large organizations.

Our approach is grounded in industry-standard PKI requirements and security best practices. We evaluate certificates against defects defined by established standards such as RFC 5280 [6] and CA/Browser Forum requirements [11], assigning risk weights based on perceived security severity. A key focus of our research is systematically measuring how different preprocessing techniques, feature engineering strategies, and modeling approaches affect prediction performance, providing insights into which improvements offer the greatest value for certificate risk assessment.

Our main contributions are as follows:

  1. We collected over 1 million publicly accessible X.509 certificates from high-impact commercial and government domains, and we analyzed each against 177 deterministic defect checks with both custom-built and open-source tools to classify the risk level of certificates and determine the prevalence of a wide range of certificate risk factors.

  2. We explored a variety of problem formulations and approaches to devise a technique for classifying certificate risk without relying on the resource-intensive, exhaustive checks for individual risk factors. Critically, we systematically measured the effect of different preprocessing, feature engineering, and modeling improvements to understand which techniques contribute most to better model performance. Our risk scoring is grounded in defects defined by established PKI standards and best practices, with weights assigned based on security severity.

  3. We optimized a series of ML models to rapidly and accurately predict the risk level of any given certificate. Our optimal model in terms of the performance-speed tradeoff processes 3.7 million certificates per second on a single machine while achieving an R2R^{2} of 0.986 on a test set of 201,976 certificates, with aggregate NDCG above 0.997, severity-tier classification of 99.76% and 98.90% recall on critical-tier defects. For an enterprise where fewer than 20% of certificates have any identified risk factor, ML triage avoids spending over 80% of deterministic analysis cycles confirming the absence of issues.

  4. We scored 571,374 certificates collected thirteen months later without model retraining to test our model durability. Extra Trees and Decision Tree retain MAE below 6.8, R2R^{2} of at least 0.915, aggregate NDCG above 0.988, severity-tier accuracy of at least 99.52%, and critical-tier recall of at least 97.03%.

This paper proceeds as follows: Section 2 reviews related literature and existing research gaps. Section 3 details our ML pipeline methodology. Section 4 describes our experimental setup, results, and analysis. Section 5 discusses practical implications and recommendations for future research.

References (32)