npm security update: Classic token creation disabled and granular token changes (original) (raw)

Editor’s note (November 5, 2025): We’ve updated this post to explicitly clarify that the affected tokens are npm tokens.

Today marks another milestone in our ongoing effort to strengthen npm’s security. As previously announced, we’re implementing the first set of changes to npm’s token management system.

Important: These changes only affect npm tokens used for the npm registry. GitHub tokens (e.g, personal access tokens, fine-grained tokens, etc.) are not affected by these changes.

What’s changing today (November 5, 2025)

npm classic tokens

npm granular access tokens

What you need to do

If you use npm classic tokens

You have until November 19, 2025 to migrate to npm granular access tokens. After this date, all npm classic tokens will be permanently revoked.

Migration steps:

  1. Visit npmjs.com/settings/~/tokens.
  2. Click Generate New TokenGranular Access Token.
  3. Configure appropriate permissions for your use case.
  4. For CI/CD workflows requiring write access, consider enabling Bypass 2FA or use established trust publishing with OIDC.
  5. Replace npm classic tokens in your workflows with the new npm granular tokens.

Note: npm granular tokens must currently be created through the npmjs.com website. We’re actively working on adding full CLI support for granular token management via npm token commands in the coming weeks.

If you use npm granular tokens

Not affected by these changes

Looking ahead: November 19, 2025

On November 19, we will permanently revoke all npm classic tokens and replace long-lived local publishing tokens with 2-hour session tokens.

Need help?

We understand these changes require effort from you. Thank you for partnering with us to make npm more secure for the entire JavaScript ecosystem.