apache / apache/cloudstack

[Hardening] F-13: Weak Default Password and Database Encryption Key.

Open
#13,341 6 comments 0 reactions 0 assignees View on GitHub
component:management-server type:enhancement
Dominant language
Java
Stars
3.1k
Forks
1.4k
Avg merge
6d 19h
Merged PRs (30d)
32

Description

### The required feature described as a wish

Image

**Description:** CloudStack ships with a default administrative password and database encryption key, both set to the string "password". Neither value is randomized at install time, and the administrator is not prompted to change them during setup. Note that the database encryption key cannot be changed afterwards.

**Affected Components:** Management

**Impact:** An attacker with knowledge of the default credentials, which are publicly documented, can authenticate to the CloudStack Management UI without any prior reconnaissance or effort. Additionally, if the database encryption key is not changed, an attacker who gains read access to the database (e.g., via SQL injection, a misconfigured backup, or direct server access) can decrypt all protected fields, including API secret keys, passwords, and other credentials, using the known default key.

**Steps to Reproduce:**
- Deploy a fresh CloudStack instance following the official documentation.
- Attempt to log in using the username `admin` and the password `password`.
- Observe that login succeeds without any prompt to change the default password.
- Separately, inspect the database encryption key on the management server:
- $ cat /etc/cloudstack/management/key
- Observe that the encryption key is set to the default value `password`.

**Recommended Remediation:** Generate a unique password and database encryption key from a reliable source of entropy during installation (before the system becomes operational). Neither value should have a usable default.

Contributor guide

Open the contributing guide

Research direction

Start with the CloudStack Management installation flow, the management UI login, and the database key at /etc/cloudstack/management/key. Trace where the default administrative password and encryption key are created and used. Done means both values are generated from reliable entropy before operation, with no usable default, and the installation behavior is covered by tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
authentication, cloud, databases, security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.