All reports
Medium

systemd: mishandling of the current keyboard mode check leading to passwords being disclosed in cleartext to attacker

Affected versions

Affected versions
Unknown
Fixed version
Not reported

Exploitation

CVE-2018-20839

Probability of exploitation in the next 30 days: 2.48%

FIRST EPSS · 2026-11-17

Description

systemd 242 changes the VT1 mode upon a logout, which allows attackers to read cleartext passwords in certain circumstances, such as watching a shutdown, or using Ctrl-Alt-F1 and Ctrl-Alt-F2. This occurs because the KDGKBMODE (aka current keyboard mode) check is mishandled.

The issue arises from the way systemd handles user passwords during the boot process. Specifically, passwords entered on the console during the system boot (e.g., for unlocking encrypted disks or logging in) could be logged in plaintext if certain conditions are met.