---
title: "HOST-FS-007 Private TLS Keys Readable by Others"
canonical: https://openvapt.com/checks/HOST-FS-007.html
html: https://openvapt.com/checks/HOST-FS-007.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
---

# HOST-FS-007 Private TLS Keys Readable by Others

Checks that TLS private keys under the standard key directories are not readable by other users.

- Domain: Server
- Severity: High
- Control category: Cryptography and TLS
- Fix effort: low
- CVSS v3.1 vector: `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N`
- CIS Controls v8: 3.10
- NIST CSF 2.0: PR.DS-02
- CWE: CWE-732
- NIST SP 800-53 Rev. 5: AC-3, AC-6

## Why It Matters

A stolen private key lets an attacker impersonate your websites and, with older key exchange, decrypt recorded traffic.

## How It Detects

Stats every existing file matching /etc/ssl/private/*, /etc/pki/tls/private/*, /etc/letsencrypt/archive/*/privkey*.pem (metadata only, contents are never read) and fails if it is readable or writable by others.

## How to Fix

chown root:root <key> && chmod 600 <key>  (or 640 with a dedicated group the web server runs in). Rotate any key that was exposed.

## How to Verify

```
stat -c '%a %U:%G %n' /etc/ssl/private/* /etc/pki/tls/private/* /etc/letsencrypt/archive/*/privkey*.pem
```

## Learn the Theory

- [P1 Linux Server Hardening](https://openvapt.com/academy/p1.md)

## References

- [OWASP Key Management Cheat Sheet](https://cheatsheetseries.owasp.org/cheatsheets/Key_Management_Cheat_Sheet.html)

## Source Code

https://github.com/OpenVAPT/openvapt/blob/574f7f3333c44b75a3c649e2d93a76d507f75adf/internal/checks/host/hardening.go

Run it: `openvapt scan --only HOST-FS-007`. Read it offline: `openvapt explain HOST-FS-007`.

---

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/HOST-FS-007.html. Part of OpenVAPT Check Catalogue. How to cite: https://openvapt.com/cite.html. Site summary for models: https://openvapt.com/llms.txt.
