filecoin-pin: Unbounded DAG pinning can exhaust server resources
Affected packages
| Package | Affected → Fixed | |
|---|---|---|
| filecoin-projectfilecoin-pin | — | Not listed |
| npmfilecoin-pin |
< 1.1.1→ 1.1.1 |
1.1.1 |
Original description The description as published by the source.
Summary
The IPFS Pinning Service API implementation accepts a caller-controlled CID through POST /pins, queues background processing, and then recursively fetches the full DAG with helia.pins.add(cid). The route and background pinning path do not enforce a request rate limit, per-user quota, maximum DAG byte count, maximum block count, traversal timeout, or concurrent pinning limit.
An authenticated caller, or an unauthenticated caller when the server is started with ALLOW_NO_AUTH=true, can submit one or more pins whose CIDs resolve to very large DAGs. The server writes fetched blocks to CAR files under carStoragePath and can consume disk, network, CPU, and libp2p resources until the process or host becomes unavailable.
Details
POST /pins validates only that the request body contains a syntactically valid CID string, then forwards it to the pin store:
src/filecoin-pinning-server.ts:304-342accepts the request, parsescidwithCID.parse, and callspinStore.pin(request.user, cidObject, parsed.options).src/filecoin-pin-store.ts:153-188stores the pin asqueuedand schedules_processPinInBackgroundwithsetTimeout. There is no queue, semaphore, or global cap around this scheduling.src/filecoin-pin-store.ts:211-217creates a per-pin Helia node and forwards caller-suppliedorigins.src/filecoin-pin-store.ts:260-274walks the full DAG withfor await (const pinnedCid of helia.pins.add(cid)).src/create-pinning-helia.ts:47-80…
Source: CVE.org (CVE Program・cvelistV5) NVD GitHub Advisory
References
- advisory github.com
- advisory nvd.nist.gov
- package github.com
- web github.com
- web github.com
- web github.com
- web github.com
- web github.com