# CVE-2019-5021: Hardcoded credentials in Alpine Linux

> Official Alpine Linux Docker images contain a NULL password for root, allowing attackers to gain root access if PAM or shadow file authentication is used.

- **Severity:** Critical 9.8 (`CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 8 May 2019
- **Updated:** 4 Aug 2024
- **Also known as:** CVE-2020-29589, CVE-2020-29590, CVE-2020-35188, CVE-2020-35194, GHSA-m3hq-qcc9-75f6, SUSE-SU-2019:1368-1, SUSE-SU-2019:1368-2, SUSE-SU-2021:4011-1, openSUSE-SU-2019:1495-1

## What is CVE-2019-5021?

CVE-2019-5021 is a critical vulnerability in Opensuse Leap, published on 8 May 2019. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

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 of 2015. Due to the nature of this issue, systems deployed using affected versions of the Alpine Linux container which utilize Linux PAM, or some other mechanism which uses the system shadow file as an authentication database, may accept a NULL password for the `root` user.

Weakness: CWE-258 (Empty Password in Configuration File)

## Which versions are affected by CVE-2019-5021?

It affects 3 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `system-user-root` | SUSE:Linux Enterprise Module for Basesystem 15 | All versions | 20190513-3.3.1 |
| `system-user-root` | SUSE:Linux Enterprise Module for Basesystem 15 SP1 | All versions | 20190513-3.3.1 |
| `suse-sles12sp3-image` | SUSE:Linux Enterprise Module for Containers 12 | All versions | 2.0.2-22.1 |
| `system-user-root` | openSUSE:Leap 15.0 | All versions | 20190513-lp151.3.3.1 |
| `system-user-root` | openSUSE:Leap 15.1 | All versions | 20190513-lp151.3.3.1 |

Products: F5 Big-Ip Controller, Gliderlabs Docker-Alpine, Opensuse Leap.

## How do I fix CVE-2019-5021?

Upgrade to a fixed version.

## Is CVE-2019-5021 being exploited?

There is no known exploitation of CVE-2019-5021 in the wild and no public exploit code.

## Other vulnerabilities in Opensuse Leap

- [CVE-2018-5543](https://insights.sbomify.com/CVE-2018-5543/): Information disclosure in F5 Container Connector (high 8.8)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2019-5021 and fix it if it is affected.

What it is: CVE-2019-5021 is a critical vulnerability in Opensuse Leap, published on 8 May 2019. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2019-5021 in the wild and no public exploit code.

Affected product: Opensuse Leap. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2019-5021/ (Markdown: https://insights.sbomify.com/CVE-2019-5021/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2019-5021
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2019-5021
- OSV: https://osv.dev/vulnerability/CVE-2019-5021

---
From sbomify Insights: https://insights.sbomify.com/CVE-2019-5021/
Summaries are generated and may contain mistakes; the official description above is the record.
