Slashdot Mirror


GitHub Accidentally Exposes Some Plaintext Passwords In Its Internal Logs (zdnet.com)

GitHub has sent an email to some of its 27 million users alerting them of a bug that exposed some user passwords in plaintext. "During the course of regular auditing, GitHub discovered that a recently introduced bug exposed a small number of users' passwords to our internal logging system," said the email. "We have corrected this, but you'll need to reset your password to regain access to your account." ZDNet reports: The email said that a handful of GitHub staff could have seen those passwords -- and that it's "unlikely" that any GitHub staff accessed the site's internal logs. It's unclear exactly how this bug occurred. GitHub's explanation was that it stores user passwords with bcrypt, a stronger password hashing algorithm, but that the bug "resulted in our secure internal logs recording plaintext user passwords when users initiated a password reset." "Rest assured, these passwords were not accessible to the public or other GitHub users at any time," the email said. GitHub said it "has not been hacked or compromised in any way."

1 of 151 comments (clear)

  1. Stored in the data base by DrYak · · Score: 5, Informative

    So how is this "random salt" recovered when you need to check the password's validity?

    It's stored along in the data base.
    Most stored password have a form like :

    ${type of algorithm used}${parameters used}${data}

    where:
    - "type of the algorithm used" tell you what was used to generate this (e.g: using Bcrypt, like GitHub as mentioned in the summary).
    - "data" is the actual salted-output that you need to replicate to successfully log-in
    - "parameters" is any extra-data that the algorithm needs to generate password checks.
    Like the salt.
    Or like the number of iterations. Because nobody sane actually use a hash function such as SHA512 anymore. Instead you use a Key Derivation Function (KDF) such as Bcrypt (or Scrypt or Argon2) and those are *slow* on purpose, to make brute-forcing much less likely (e.g.: they slow down by repeating a hash for large number of iterations).

    The exact implementation vary (the above is typically used by the "crypt" function used, e.g., on Linux log-ins),
    but basically are the same : the salt (and iterations) are stored together with the "hash" that you need to test.

    And most of the KDF function can work as "hash_to_compare = KDF(password_login_attempt, old_hash_from_database)", ie.: they can automatically extract the parameters if you give them the string that is in the database, and generate the hash the exact same way.
    They'll invent a new salt (and guess the optimal number of iterations) only if you omit the old hash and give the new password as the single parameter.

    --
    "Sufficiently advanced satire is indistinguishable from reality." - [Tips: 1DrYakQDKCQ6y52z6QbnkxHXAocMZJE61o ]