cli icon indicating copy to clipboard operation
cli copied to clipboard

[BUG] NPM Audit is experiencing elevated latency

Open maigovannon opened this issue 2 months ago • 28 comments

Is there an existing issue for this?

  • [x] I have searched the existing issues

This issue exists in the latest npm version

  • [x] I am using the latest npm

This is not just a request to bump a dependency for a CVE

  • [x] This is not solely a request to bump a dependency for a CVE

Current Behavior

Here is the log of the latest npm install. The way to mitigate is to use --no-audit but I would want to avoid doing that.

abhinasu-mac:nodejs abhinasu$ npm i --verbose
npm verbose cli /opt/homebrew/Cellar/node/24.1.0/bin/node /opt/homebrew/bin/npm
npm info using [email protected]
npm info using [email protected]
npm verbose title npm i
npm verbose argv "i" "--loglevel" "verbose"
npm verbose logfile logs-max:10 dir:/Users/abhinasu/.npm/_logs/2026-09-04T04_11_41_471Z-
npm verbose logfile /Users/abhinasu/.npm/_logs/2026-09-04T04_11_41_471Z-debug-0.log
npm http fetch POST 200 https://registry.npmjs.org/-/npm/v1/security/advisories/bulk **173178ms**

up to date, audited 69 packages in 3m

27 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
npm verbose cwd /Users/abhinasu/Developer/helloworld/nodejs
npm verbose os Darwin 24.6.0
npm verbose node v24.1.0
npm verbose npm  v11.3.0
npm verbose exit 0
npm info ok

Expected Behavior

No response

Steps To Reproduce

  1. In this environment...
  2. With this config...
  3. Run 'npm i'
  4. See error...

No error but takes too long

Environment

  • npm:
  • Node.js:
  • OS Name: Mac/Linux
  • System Model Name:
  • npm config:
npm install

maigovannon avatar Sep 04 '26 05:09 maigovannon

This has been an issue for hours; since at least 4:30 PM PT. Additional logs below:

npm timing npm:load:whichnode Completed in 1ms
npm timing npm:load:configload Completed in 2ms
npm timing config:load:flatten Completed in 1ms
npm timing npm:load:mkdirpcache Completed in 0ms
npm timing npm:load:mkdirplogs Completed in 0ms
npm timing npm:load:setTitle Completed in 5ms
npm timing npm:load Completed in 20ms
npm timing arborist:ctor Completed in 0ms
npm timing auditReport:getReport Completed in 300051ms
npm timing audit Completed in 300063ms
npm warn audit network timeout at: https://registry.npmjs.org/-/npm/v1/security/advisories/bulk
npm timing command:audit Completed in 300065ms
npm error audit endpoint returned an error
npm timing npm Completed in 300331ms
{
  "message": "network timeout at: https://registry.npmjs.org/-/npm/v1/security/advisories/bulk",
  "error": {
    "summary": "",
    "detail": ""
  }
}```

brooksg-assetwatch avatar Sep 04 '26 05:09 brooksg-assetwatch

Blocking our deploys as well.

Ryangr0 avatar Sep 04 '26 05:09 Ryangr0

Took a tcpdump for

curl -v --resolve registry.npmjs.org:443:104.16.6.34 --data "" https://registry.npmjs.org/-/npm/v1/security/advisories/bulk

Pcap in plaintext for a single stream:

onestream.txt

We do not see any network layer issues here, the TCP and TLS handshake completes instantly and the data transfer from client to the server is done quickly and each packet is ackd.

Then there is a delay of 5mins after which we see a response from the server. The keep-alives in that 5min period is ackd.

The target is proxied through cloudflare but we're not seeing any networking issues or any indication of an issue at cloudflare, this looks like an application layer issue at the upstream where the latency has increased significantly before a response is set out

milanmenezes avatar Sep 04 '26 06:09 milanmenezes

npm warn audit 503 Service Unavailable - POST https://registry.npmjs.org/-/npm/v1/security/advisories/bulk - Service Unavailable
{ error: 'Service Unavailable' }

MrSwitch avatar Sep 04 '26 08:09 MrSwitch

Same observation from Australia. npm install either hangs for a long time before finishing, or not finishing at all. Confirm that install works if I use --no-audit, which is not desirable. Maybe it's an issue with npm itself.

nguyentran0212 avatar Sep 04 '26 08:09 nguyentran0212

Confirming the same issue

Environment:

  • Node.js: 24.18.0
  • Registry: default https://registry.npmjs.org
  • Command: npm audit --omit=dev --audit-level=high
  • No custom registry or proxy
  • npm ci --ignore-scripts completed successfully immediately beforehand

At 2026-09-04T07:31:40Z, the audit request waited for approximately 300 seconds and then failed with:

npm warn audit 503 Service Unavailable - POST https://registry.npmjs.org/-/npm/v1/security/advisories/bulk - Service Unavailable
{ error: 'Service Unavailable' }
npm error audit endpoint returned an error

albert-cyber-dealer avatar Sep 04 '26 08:09 albert-cyber-dealer

Same observation from Australia. npm install either hangs for a long time before finishing, or not finishing at all. Confirm that install works if I use --no-audit, which is not desirable. Maybe it's an issue with npm itself.

We use pnpm for auditing and get 5 minute timeouts as well

StefanGraeber avatar Sep 04 '26 08:09 StefanGraeber

Having same issue in South Korea... for about 5-6 hours. audit error FetchError: network timeout at: https://registry.npmjs.org/-/npm/v1/security/advisories/bulk

  • os Windows_NT 10.0.26200
  • node v24.20.0
  • npm v11.19.0

brainz-jshu avatar Sep 04 '26 09:09 brainz-jshu

Same issues here :(

juancarlosjr97 avatar Sep 04 '26 09:09 juancarlosjr97

And no information on the status page at all: https://status.npmjs.org/

Image

rago4 avatar Sep 04 '26 09:09 rago4

Confirming this from Denmark with Node.js 22 and npm 10.9.4.

Audit requests take 2–7 minutes and then fail with HTTP 503. The bulk request also sometimes fails and falls back to the retiring Quick Audit endpoint, which returns HTTP 400/503.

The same latency occurs in GitHub Actions and Google Cloud Build, while installs with --no-audit complete normally.

Kalleman1 avatar Sep 04 '26 09:09 Kalleman1

Happening in Germany, too. Independent from ISP or specific location. Happens on our on-prem CI/CD system as well as on local machines.

FlorianRappl avatar Sep 04 '26 09:09 FlorianRappl

In case it helps, here’s my latest npm install run:

npm verbose audit error FetchError: network timeout at: https://npm.global-office.de/-/npm/v1/security/advisories/bulk
npm verbose audit error     at Timeout.<anonymous> (/home/mwaibel/bin/node-v24.16.0-linux-x64/lib/node_modules/npm/node_modules/minipass-fetch/lib/index.js:108:18)
npm verbose audit error     at listOnTimeout (node:internal/timers:605:17)
npm verbose audit error     at process.processTimers (node:internal/timers:541:7) {
npm verbose audit error   code: 'FETCH_ERROR',
npm verbose audit error   errno: 'FETCH_ERROR',
npm verbose audit error   type: 'request-timeout'
npm verbose audit error }

up to date in 5m

117 packages are looking for funding
  run `npm fund` for details
npm verbose cwd /home/—redacted—
npm verbose os Linux 6.8.0-138-generic
npm verbose node v24.16.0
npm verbose npm  v11.13.0
npm verbose exit 0
npm info ok

mwaibel-go avatar Sep 04 '26 09:09 mwaibel-go

Happening in Taiwan, too.

shiloh-lee-appier avatar Sep 04 '26 09:09 shiloh-lee-appier

also getting

npm warn audit 503 Service Unavailable - POST https://registry.npmjs.org/-/npm/v1/security/audits/quick - Service Unavailable

d-timur-reply avatar Sep 04 '26 10:09 d-timur-reply

Unfortunately, the npm install is also affected. Now it usually takes around 5 minutes. Writing it from Ukraine 🇺🇦

Image

oleksandr-danylchenko avatar Sep 04 '26 10:09 oleksandr-danylchenko

facing the same issue can i assume this is gonna take whole day to fix and i call it a day :D Image

aniketsingh1403 avatar Sep 04 '26 10:09 aniketsingh1403

Same issue in registry.yarnpkg.com from Spain

TTP 58584: CLIENT socket onTimeout HTTP 58584: SOCKET ERROR: Timeout awaiting 'socket' for 60000ms TimeoutError: Timeout awaiting 'socket' for 60000ms at A (/home/alvaro/projects/orion/orion-microservice-product/cli/node/.yarn/releases/yarn-4.18.0.cjs:144:15329) at ClientRequest.w (/home/alvaro/projects/orion/orion-microservice-product/cli/node/.yarn/releases/yarn-4.18.0.cjs:144:15573) at Object.onceWrapper (node:events:638:28) at ClientRequest.emit (node:events:536:35) at l.emit (/home/alvaro/projects/orion/orion-microservice-product/cli/node/.yarn/releases/yarn-4.18.0.cjs:143:22975) at TLSSocket.emitRequestTimeout (node:_http_client:849:9) at Object.onceWrapper (node:events:638:28) at TLSSocket.emit (node:events:536:35) at Socket._onTimeout (node:net:595:8) at listOnTimeout (node:internal/timers:581:17) ➤ YN0001: RequestError: Timeout awaiting 'socket' for 60000ms

kortatu avatar Sep 04 '26 10:09 kortatu

This is a global issue: all my tests fail regardless of where they run, locally in Türkiye or on GitHub-hosted runners, likely in the US.

Even an isolated three-package project times out. Package installation remains fast; only /-/npm/v1/security/advisories/bulk stalls, indicating a server-side audit service problem.

bulentv avatar Sep 04 '26 10:09 bulentv

Same issues in Spain :(

marcus-hergo avatar Sep 04 '26 10:09 marcus-hergo