Skip to content

Lessons from recent NPM password vulnerabilities #815

@Diggsey

Description

@Diggsey

See https://github.com/ChALkeR/notes/blob/master/Gathering-weak-npm-credentials.md for reference.

Cargo/crates.io is less affected than NPM, since it relies on github authentication for publishing, which one would expect to already be fairly well hardened against these kind of brute-forcing attacks. However, this doesn't prevent the use of leaked passwords and other human errors.

AFAICT, these are the only actions from the article which might apply to crates.io:

  • Notify package authors when a new version of a package they own is packaged (with opt-out)
  • Opt-in confirmation of package-publish on the website (in case a user's API key is leaked somehow)

These are some other possibilities:

  • Requiring 2FA for accounts with publish access to popular repositories (for example, more than N downloads). Publishing would be restricted until all users have 2FA enabled, or until the organisation has the "require 2FA" option enabled.
  • Opt-in confirmation of package-publish via a second maintainer

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-accountsC-enhancement ✨Category: Adding new behavior or a change to the way an existing feature works
    No fields configured for Feature Request.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions