Skip to content

pgwire/auth: password auth leaks information #47595

@knz

Description

@knz

The following error cases are reported to the client directly or indirectly, in a way that lets an attacker guess whether a user exists or not, or whether they have a password at all, etc:

  • the user does not exist
  • there was an error retrieving the password
  • the password is empty (password auth cannot continue)
  • the password is expired
  • the password check has failed

All these cases must be replaced by a single error sent to the client "password auth has failed" - all these situations should be indistinguishable from each other from an attacker's perspective. (However, they must still be distinguished in the authentication logs.)

cc @aaron-crl

Jira issue: CRDB-4397

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-authenticationPertains to authn subsystemsA-securityA-sql-pgwirepgwire protocol issues.C-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.T-server-and-securityDB Server & Securityno-issue-activity

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions