Alpine Linux Docker Image root User Hard-Coded Credential Vulnerability
The official Alpine Linux Docker images since version 3.3 contain a blank password field for the root user in /etc/shadow, meaning the root account has no password rather than being locked. An attacker could log in as root without a password if a service uses the shadow file for authentication.
Originally disclosed on Cisco Talos
Versions of the Official Alpine Linux Docker images (since v3.3) contain a NULL password for the root user. This vulnerability appears to be the result of a regression introduced in December t2015.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely a build configuration flag that disabled the root account by default was removed from the edge build properties file, and subsequent builds copied that configuration, leaving the root password field empty.
Impact
Systems deployed using affected Alpine containers that use Linux PAM or another mechanism reading the shadow file may accept a NULL password for root, allowing unauthenticated root access.
What the attacker needed
Service uses shadow file for auth; affected Alpine Docker image
The fix
The root account should be explicitly disabled in Docker images built using affected versions as a base.
How it was found
- Run a Docker container using an affected Alpine image version.
- Read the first line of /etc/shadow inside the container.
- Observe that the root entry has an empty password field.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
In Linux, the file /etc/shadow stores password hashes. A blank field means no password is required, so anyone can log in as root without typing anything. This is dangerous if a service on the container uses that file to check passwords.
What is Misconfiguration?
Settings left unsafe: exposed panels, open storage buckets, debug modes, default credentials.