-
Notifications
You must be signed in to change notification settings - Fork 46.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: An imposter library @actuallyworks/node-fetch was added as a dependency #25605
Comments
This package was added to the workspace root and is only installed if you're working on React not if you're installing any package published from facebook/react. The "imitating" has a pretty negative conotation when all they did is forking the package which is a perfectly legitimate action. |
Yes, but if the package ever becomes malicious it can not only affect the React core team (which is bad on its own) but also make its way into the React bundle.
Why not just pin to an older version of
Yes and that is why I used it. The author didn't do any of the proper things for a fork. They didn't update anything about the package metadata (repo link, readme, etc). A legitimate, well-intentioned fork would clearly identify itself as such with reasons as to why it was forked. |
Only if it is declared in the actual package.json that are published. |
Okay. But why not just pin |
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:@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 actualnode-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.
The text was updated successfully, but these errors were encountered: