You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Sign inDemoInstall


npm in Review: A 2023 Retrospective on Growth, Security, and Quirky Facts

From unprecedented expansion to security challenges: A comprehensive look at npm's dynamic year.

npm in Review: A 2023 Retrospective on Growth, Security, and Quirky Facts

Philipp Burckhardt

January 10, 2024

It's a new year! So let's look back at how npm, the most popular package manager in the world, fared in 2023. We will look at some of the major trends in the ecosystem and investigate what the data reveal about how npm grew over the past year.

We'll also take a deeper dive into some of the malware and spam issues npm faced over the course of the year, and answer questions you didn't knew you wanted to know the answers to (such as which package has the longest name or is biggest in size).

Get ready, let's dive in!

Exploring npm's Explosive Growth#

Just ten years ago, it was feasible to read out the name of every npm package in a conference talk. By the end of 2023, Socket had ingested almost four million packages from the npm registry from almost nine hundred thousand maintainers.

The official npm statistics showed more than 2.5 million live packages by the end of 2023, with download counts exceeding a staggering 184 billion package downloads per month.

The discrepancy between 2.5 and four million highlights that many packages end up getting removed from the registry. Publishing to npm is easy and there is no gatekeeping and vetting of packages before release, so the npm registry has developed a reputation of hosting more malicious packages than other language ecosystems. However, this reputation may not be fully warranted based on some of the nefarious findings we've already made in the Python ecosystem.

Over the course of 2023, we released support for Python and Go, with support for additional language ecosystems such as Java planned for 2024. In the future, we'll release ecosystem comparisons where we put the conventional wisdom to the test!

Our data show that in 2023, 10,518,566 package versions were published to the npm registry. Here is a breakdown per month, showing that the registry saw the most package updates during the months of March and April, possibly due to the massive John Wick-themed spam and phishing campaign that targeted the npm registry in March and April 2023.

npm Package Versions Published Per Month

At the same time, the registry saw 1,241,583 versions being unpublished in 2023. We counted 165,486 new maintainers in 2023, which at this rate suggests that we will see the one million package maintainer mark being crossed in 2024!

Package Pulse

So what kind of packages do we see getting published and used most? While npm started as the package manager for Node.js, its meteoric rise over the last couple of years coincides with it becoming the de-facto standard package manager for JavaScript front-end projects as well, largely replacing Bower, and leading to a more unified and streamlined development workflow in JS projects.

The graph below shows the top 50 packages by the number of packages that depend on them:

Top 50 npm Packages By Dependents Count

One clear observation is how popular TypeScript has become. Initially released in October 2011, TypeScript gained significant popularity around 2017-2018 and is now the standard for authoring large applications, but it is increasingly being used for library code as well.

In terms of front-end frameworks and libraries, React being at second place is no surprise, given its large component ecosystem and dominant status in the ecosystem. The only other front-end library in the list is Vue.js (Angular is represented first with @angular/core at position 62.)

Another angle we could take is looking at the most popular packages by their weekly downloads:

Top 20 npm Packages by Recent Weekly Downloads

The list is dominated by well established utility-focused packages that are used transitively by many packages and thus rack up a significant number of downloads. Prolific open-source developer and maintainer Sindre Sorhus has a very strong presence here, being responsible for half of the packages in the list.

Alternatively, we could restrict our attention to packages that were first released in 2023. Then, the list looks as follows:

Security Challenges and Responses#

At Socket, we scanned millions of files inside npm packages with Socket AI, our AI-powered threat detection system. In 2023, we identified more than five thousand packages as malware that were subsequently taken down by the npm registry.

2023 saw several high-profile supply chain attacks in the cryptocurrence space. A package like hardhat-gas-report was benign for months before being updated with malicious code to steal Ethereum private keys. And on December 14th, a malicious version of Ledger Connect Kit was published after a former Ledger employee fell victim to a phishing attack that gained access to their npmjs account, which attempted to reroute funds to a hacker wallet.

Besides the uptick in malware, npm faced multiple spam campaigns, during which the attackers published large quantities of spam packages to the npm registry. Back in February last year, more than 15,000 spam packages were published to npm in a matter of two days. Socket's security research team uncovered a different large spam campaign later in the year.

Final Surprises #

Last but not least, here are some answers to questions you were likely not contemplating, but which once raised may pique your curiosity:

What is the package with the longest name?

First, it should be pointed out that 214 characters is the maximum length allowed for a package name on npm. So are there are such packages on the registry? Yes; the following packages all max out the available number of characters:

What are the biggest packages on the registry?

Leading the pack is @chainsafe/eth2-spec-tests with a whopping size of 5.96 GB. Close on its heels is version 1.1.0 of kuzzle, which is not far behind at approximately 5.88 GB. modez comes in third, with a sizeable 4.39 GB. Following these are @mpetrunic/eth2-spec-tests and version 0.9.3 of docloop, weighing in at 4.13 GB and 3.38 GB, respectively. See below for the full top 10 of largest package versions as measured by their unpacked size.

Largest packages on the npm registry

  1. @chainsafe/eth2-spec-tests@0.12.3 (5.96 GB)
  2. kuzzle@1.1.0 (5.89 GB)
  3. modez@1.0.4 (4.39 GB)
  4. @mpetrunic/eth2-spec-tests@1.0.1 (4.13 GB)
  5. docloop@0.9.3 (3.38 GB)
  6. @twigeducation/ts-fe-components@5.9.1 (3.22 GB)
  7. similar-persian-words@1.0.2 (3.05 GB)
  8. @sofit/view-locale@2.0.1 (2.14 GB)
  9. quint-cli@0.13.0 (2.08 GB)
  10. steamboat@0.1.1 (1.77 GB)

What is the package with the most maintainers?

The winner is @seek/asia-translations, boasting 554 maintainers. Following closely are two packages from Condé Nast, but the BBC has a strong presence in the top 10 with several packages as well. Below is the full list of the top 10 package versions, ranked by the number of maintainers.

Packages with the most maintainers on the npm registry

  1. @seek/asia-translations@1.0.0 (554 maintainers)
  2. @condenast/seawasp-bull-queue@0.1.4 (530 maintainers)
  3. @condenast/cna-st-codec@0.1.4 (530 maintainers)
  4. @bbc/storyplayer@0.4.16 (494 maintainers)
  5. @bbc/digital-paper-edit-client@0.8.2-alpha.2 (494 maintainers)
  6. @bbc/stt-align-node@1.0.0 (494 maintainers)
  7. @bbc/newslabs-helper-analytics@3.1.3 (493 maintainers)
  8. @bbc/local-election-2020-assets@0.0.1 (491 maintainers)
  9. @bbc/digital-paper-edit-storybook@1.7.0 (491 maintainers)
  10. @bbc/object-based-media-schema@0.3.3 (490 maintainers)

Subscribe to our newsletter

Get notified when we publish new security blog posts!

Try it now

Ready to block malicious and vulnerable dependencies?

Install GitHub AppBook a demo

Related posts

Back to all posts
SocketSocket SOC 2 Logo



Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc