-
Notifications
You must be signed in to change notification settings - Fork 49k
Description
In a recent PR #25516 a new dependency was added @actuallyworks/node-fetch
. This raised red flags for me. In investigating the library, here's the reasons to be alarmed:
- There is only one version which was published just a few weeks before it was added to React.
- The NPM README, repository links, etc all point to the real node-fetch repo.
- This is an old version of node-fetch which was reuploaded recently.
- There is no explanation as to why an old version of a popular library was uploaded by an unknown author with no noticeable changes.
- The publisher on NPM hasn't been very active nor has any history of trust. About the same time that
@actuallyworks/node-fetch
was published (imitatingnode-fetch
), they also published @actuallyworks/p-map (imitatingp-map
) and @actuallyworks/chalk (imitatingchalk
). All of these libraries are published at the same time and follow the same pattern of copying a very popular library and uploading an old (seemingly unchanged) version.
I wasn't able to find any obviously malicious code in @actuallyworks/node-fetch
at the time of writing this but there doesn't seem to be any good reason to use this library over the actual node-fetch
. The main concern is that at some point in the future, the author of this imposter package can release a new version which does add something malicious and the React contributors would be affected and possibly even the React users if the attack was able to get new code into the bundle.
React version: Unreleased. Link to commit
Steps To Reproduce
N/A
The current behavior
React depends on a package @actuallyworks/node-fetch which is a reupload of an old version of the real node-fetch.
The expected behavior
React would only depend on trusted packages to avoid future NPM supply chain attacks.