Description
The default cloud-init configuration, in cloud-init 0.6.2 and newer, included "ssh_deletekeys: 0", disabling cloud-init's deletion of ssh host keys. In some environments, this could lead to instances created by cloning a golden master or template system, sharing ssh host keys, and being able to impersonate one another or conduct man-in-the-middle attacks.
Vulnerability type
CWE-321
Use of Hard-coded Cryptographic Key
The product uses a hard-coded, unchangeable cryptographic key.
Impact on systems
| Scope | Impact |
| Access Control |
Bypass Protection Mechanism, Gain Privileges or Assume Identity, Read Application Data If hard-coded cryptographic keys are used, it is almost certain that malicious users will gain access through the account in question. The use of a hard-coded cryptographic key significantly increases the possibility that encrypted data may be recovered. |
How to prevent it
Architecture and Design
Prevention schemes mirror that of hard-coded password storage.
All 319 CWE-321 CVEs, with trend and prevention