Summary
Bitnami Cassandra container images may retain the built-in cassandra:cassandra superuser even after a custom admin account is configured via CASSANDRA_USER.
If the default superuser is not dropped as intended, attackers who can reach the database service can attempt to authenticate using this known credential and gain full administrative control.
Affected context
This vulnerability appears in Bitnami Cassandra container deployments where:
- The image is an affected 4.0.x, 4.1.x, or 5.0.x build, and
- A custom administrator is configured with the
CASSANDRA_USERenvironment variable, and - The initialization logic fails to remove or disable the original
cassandrasuperuser.
In such configurations, the cluster may silently retain the default cassandra:cassandra account as a fully privileged login path, even though operators may assume it has been removed.
Exploit preconditions
- Attack surface: Cassandra service endpoint exposed within a cluster, VPC, or to the internet
- Required access: Network connectivity to the Cassandra port(s) and knowledge or discovery of default credentials
- Trigger point: Authentication attempts using the retained
cassandrasuperuser account - Why exploitation is possible: The initialization script does not reliably drop or disable the built-in
cassandrasuperuser, so a well-known username/password combination remains valid despite the presence of a custom admin account.
Why this happens
The underlying issue is a credential management flaw consistent with CWE-798: Use of Hard-coded Credentials.
The container image ships with a known default superuser (cassandra with a default password), and the automation responsible for decommissioning this account when a custom admin is configured does not function correctly in all scenarios.
As a result, a high-privilege account with a static, widely known credential persists in production environments, creating a predictable and reusable authentication backdoor.
Potential impact
- Attackers may gain full administrative control of the Cassandra cluster using default credentials.
- Data stored in Cassandra can be read, modified, or deleted without authorization.
- Cluster configuration and schema can be altered, potentially causing outages or data corruption.
- The compromised database may be used as a pivot point to attack other services in the environment.
General mitigation guidance
Mitigation focuses on eliminating reliance on default credentials and hardening identity and access paths around the database:
- Ensure all default or built-in superuser accounts are explicitly disabled, removed, or renamed during provisioning.
- Enforce strong, unique passwords for all administrative accounts, and avoid embedding credentials directly in images or source code.
- Use externalized secret management (e.g., secret stores or key vaults) instead of environment variables where feasible, and rotate credentials regularly.
- Restrict network exposure of Cassandra to only necessary clients and trusted administrative networks, applying firewall rules and service mesh policies.
- Apply least-privilege role design, avoiding shared superuser accounts and preferring per-operator identities tied to audit logging.
How teams detect issues like this
Effective detection typically combines configuration inspection and behavioral monitoring:
- Periodically enumerate Cassandra roles and verify that default or vendor-provided superusers (such as
cassandra) are disabled or removed in production. - Use configuration and container security scanning to flag images that contain or rely on known default credentials and to detect misconfigured initialization scripts.
- Implement automated checks in CI/CD pipelines that validate database bootstrap scripts and reject deployments where default accounts remain active.
- Monitor authentication logs and database audit trails for logins using default usernames or from unusual network locations, and alert on successful superuser logins.

