CVE-2020-8903
Priviged Escalation in Google Cloud Platform's Guest-OSLogin
Check your servers for CVE-2020-8903
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2020-8903 affects guest-oslogin, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
Description
A vulnerability in Google Cloud Platform's guest-oslogin versions between 20190304 and 20200507 allows a user that is only granted the role "roles/compute.osLogin" to escalate privileges to root. Using their membership to the "adm" group, users with this role are able to read the DHCP XID from the systemd journal. Using the DHCP XID, it is then possible to set the IP address and hostname of the instance to any value, which is then stored in /etc/hosts. An attacker can then point metadata.google.internal to an arbitrary IP address and impersonate the GCE metadata server which make it is possible to instruct the OS Login PAM module to grant administrative privileges. All images created after 2020-May-07 (20200507) are fixed, and if you cannot update, we recommend you edit /etc/group/security.conf and remove the "adm" user from the OS Login entry.
Severity (CVSS)
CVSS:4.0/AV:L/AC:H/AT:N/PR:L/UI:A/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H
- Attack vector
- local: the attacker needs local access, or a user has to open a prepared file
- Attack complexity
- high: an attack depends on conditions outside the control of the attacker, such as a race
- Attack requirements
- none: an attack works without special conditions on the target
- Privileges required
- low: the attacker needs an ordinary user account
- User interaction
- active: a user has to take a deliberate step, such as installing or running something
- Impact on the vulnerable system
- confidentiality high, integrity high, availability high: what an attacker can read, change or stop in the vulnerable component
- Impact on other systems
- confidentiality high, integrity high, availability high: what an attacker can read, change or stop beyond it
Exploitation
EPSS 0.32%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 26.3% of all scored CVEs. Scores of 1 Dec 2026.
Weakness
- CWE-276 Incorrect Default Permissions
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
| guest-oslogin |
affected from 20190304, before 20200507 unaffected 20200507
Other versions: unaffected
|
Is my server affected?
Find the installed version of guest-oslogin and compare it with the fixed version of your distribution. Distributions often fix a CVE in a package version of their own, so the version number of the upstream project can mislead.
Debian, Ubuntu
dpkg -l | grep -i guest-oslogin
# packages whose changelog names the CVE (fixed in the installed version)
zgrep -l CVE-2020-8903 /usr/share/doc/*/changelog.Debian.gz
# Ubuntu
pro fix CVE-2020-8903RHEL, Rocky, Alma, Fedora
rpm -q guest-oslogin
# lists the advisory while the fix is not installed
dnf updateinfo list --cve CVE-2020-8903Alpine
apk list --installed | grep -i guest-osloginWith Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2020-8903
trivy image --scanners vuln IMAGE | grep CVE-2020-8903
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Advisories
- https://github.com/GoogleCloudPlatform/guest-oslogin/pull/29 github.com
- openSUSE-SU-2020:0996 lists.opensuse.org · vendor advisory
- openSUSE-SU-2020:1014 lists.opensuse.org · vendor advisory
Other references
- https://gitlab.com/gitlab-com/gl-security/gl-redteam/red-team-tech-notes/-/tree/master/oslogin-privesc-june-2020 gitlab.com
- https://cloud.google.com/support/bulletins/#gcp-2020-008 cloud.google.com
Source: the record CVE-2020-8903 of the CVE List (CVE Program), CVE Terms of Use; EPSS of FIRST; the CWE catalog of MITRE, CWE Terms of Use. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse