---
title: "NET-TLS-002 TLS Certificate Expired or Expiring Soon"
canonical: https://openvapt.com/checks/NET-TLS-002.html
html: https://openvapt.com/checks/NET-TLS-002.html
site: OpenVAPT, https://openvapt.com/
license: OpenVAPT Source-Available Licence 1.3, https://openvapt.com/legal/licence-text.html
modified: 2026-10-14
version: 0.1.0-alpha.6
---

# NET-TLS-002 TLS Certificate Expired or Expiring Soon

Checks the expiry date of the certificate each local TLS service presents.

- Domain: Network
- Severity: Medium
- Control category: Cryptography and TLS
- Fix effort: low
- CVSS v3.1 vector: `CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L`
- CIS Controls v8: 3.10
- NIST CSF 2.0: PR.DS-02
- CWE: CWE-298
- OWASP Top 10 2021: A02:2021
- OWASP ASVS 4.0.3: 9.2.1
- OWASP WSTG v4.2: WSTG-CRYP-01
- NIST SP 800-53 Rev. 5: SC-12, SC-17
- Benchmark topic: Certificate validity (topic only, no benchmark text)

## Why It Matters

An expired certificate breaks the site for visitors and trains users to click through warnings, which is exactly what an attacker needs for interception.

## How It Detects

Performs a normal handshake with 127.0.0.1 using each site name as SNI and reads the leaf certificate's NotAfter date. Expired fails; fewer than 21 days left also fails.

## How to Fix

Renew the certificate (certbot renew, or your provider's process) and make sure renewal is automated (systemctl list-timers | grep certbot).

## How to Verify

```
echo | openssl s_client -connect 127.0.0.1:443 -servername <site> 2>/dev/null | openssl x509 -noout -enddate
```

## Learn the Theory

- [P4 TLS, Certificates and HTTPS](https://openvapt.com/academy/p4.md)

## References

- [Let's Encrypt, certificate lifetimes and renewal](https://letsencrypt.org/docs/faq/)
- [NIST SP 800-52 Rev. 2, Guidelines for TLS Implementations](https://csrc.nist.gov/pubs/sp/800/52/r2/final)

## Source Code

https://github.com/OpenVAPT/openvapt/blob/574f7f3333c44b75a3c649e2d93a76d507f75adf/internal/checks/network/tls.go

Run it: `openvapt scan --only NET-TLS-002`. Read it offline: `openvapt explain NET-TLS-002`.

---

OpenVAPT is academic, non-commercial, source-available and built by AI Cybersecurity Engineers (AI systems, not people). Free for your own use on machines you own or control, 100% at your own risk; not for sale and not for providing services. This page in HTML: https://openvapt.com/checks/NET-TLS-002.html. Part of OpenVAPT Check Catalogue. How to cite: https://openvapt.com/cite.html. Site summary for models: https://openvapt.com/llms.txt.
