Skip to content

read --silent is storing passwords in plaintext in history #7230

@mdenzel

Description

@mdenzel

Hello guys,

it seems that fish is storing plaintext passwords when using read --silent to read them in. This makes password prompts a security hazard.

It has already been fixed according to #6438 and #5904 (also #838, #1504) but does not seem to work as expected:

> set | grep fish_private
fish_private_mode
> fish --private
Welcome to fish, the friendly interactive shell.
fish is running in private mode, history will not be persisted.
> set | grep fish_private
fish_private_mode 1
> read --silent password
read> ●●●●●●●●●●●●●●●●
> mysecretpassword
(simply by pressing the "up" arrowkey; it also shows up in the 'history' command)

Attackers could just dump passwords from fish's history.

Systeminfo:

> echo $TERM
xterm-256color
> uname -r
5.7.10-201.fc32.x86_64
> fish --version
fish, version 3.1.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions