VDB
Sign up
MEDIUM6.5

GHSA-9f24-jqhm-jfcw

fetch(url) leads to a memory leak in undici

Quick fix

GHSA-9f24-jqhm-jfcw — undici: upgrade to the fixed version with the command below.

npm install undici@6.6.1

Details

### Impact

Calling `fetch(url)` and not consuming the incoming body ((or consuming it very slowing) will lead to a memory leak.

### Patches

Patched in v6.6.1

### Workarounds

Make sure to always consume the incoming body.

Are you affected?

Enter the version of the package you're using.

Affected packages

npm/undici
Introduced in: 6.0.0Fixed in: 6.6.1
Fixnpm install undici@6.6.1

References

Check it before you install it

One call answers whether to add this package: known advisories, CISA KEV, and whether the name is a hallucinated or freshly squatted one. No key needed to try it.

curl -s https://vdb.ai.kr/v1/ai/check-packages \
  -H 'Content-Type: application/json' \
  -d '{"packages":["pkg:npm/undici"]}'