All reports
Medium

cloud-init: Use of random.choice when generating random password

Affected versions

Affected versions
Unknown
Fixed version
Not reported

Exploitation

CVE-2020-8631

Probability of exploitation in the next 30 days: 0.44%

FIRST EPSS · 2026-11-19

Description

cloud-init through 19.4 relies on Mersenne Twister for a random password, which makes it easier for attackers to predict passwords, because rand_str in cloudinit/util.py calls the random.choice function.

A flaw was found in cloud-init, where it uses the random.choice function when creating sensitive random strings used for generating a random password in new instances. Depending on the instance configuration, a remote or local attacker may abuse this vulnerability to guess the password of the victim user.