PortGate

Advisories · Docker & Containers

CVE-2019-5021 Critical CVSS 9.8

Alpine official images shipped an empty root password

Disclosed 2019 · Last reviewed 2 Dec 2026

The root account in those images had an empty password field. Any service that asked the system for the root password, including some SSH setups, could accept a blank password.

What happened

The image build left root in /etc/shadow with an empty password hash instead of a locked account.

Affected and patched versions

Affected
Official Alpine Linux Docker images 3.3, 3.4, and 3.5 built before the February 2019 rebuild. Later Alpine versions disabled the root password.
Patched
Rebuilt Alpine 3.3, 3.4, and 3.5 images from February 2019, and Alpine 3.6 or later.

How to check your server

Check

grep '^root:' /etc/shadow
cat /etc/alpine-release

How to fix and harden

  1. An empty password looks like root:: in /etc/shadow. A locked account uses ! or * in the password field.
  2. Pull a current Alpine image and rebuild. Do not keep running a 2019 base image.
  3. On a container you cannot rebuild yet, lock the root account.
  4. Do not publish SSH from that container.

Fix

passwd -l root

Sources

Version ranges and fixes follow the vendor advisory. When a distribution backports a fix, trust its security tracker over the upstream version number. New advisories: RSS · JSON