5 ms·
Statement on NPM Package Vulnerability in v5.0.2-5.1.0 of Copay Bitcoin Wallets
- nubb 8y agoIn today's world where folks are working hard on stealing crypto, I can't believe anyone would trust a software wallet. If you're blowing cash on crypto, the least a person can do is blow a little more on a hardware wallet or keep it on an exchange.
- Phlarp 8y agoWe've really come full circle if the prevailing wisdom going into 2019 is to store coins in an exchange wallet!
- dantillberg 8y agoCrypto exchanges have grown a little bit less shady over the past few years. (some, certainly not all!)
- Tepix 8y agoAirgapped systems and paper wallets work, too.
- icedchai 8y agoHow about just not keeping your wallet on your dev system? My wallet is on a dedicated box. It has no access other than SSH. At one point that server was worth more than my house!
- CGamesPlay 8y agoThe compromised package was a dependency of the wallet software, it doesn't matter what machine you kept it on if you used a compromised version.
- icedchai 8y agoSorry, I misunderstood. Though I wouldn't trust anything other than the bitcoin core wallet...
- dboreham 8y agoThe underlying story is here : https://github.com/dominictarr/event-stream/issues/116 https://github.com/dominictarr/event-stream/issues/116
- malikolivier 8y agoBelow is the scariest part in this story: "@dominictarr Why was @right9ctrl given access to this repo?" Response: "he emailed me and said he wanted to maintain the module, so I gave it to him. I don't get any thing from maintaining this module, and I don't even use it anymore, and havn't for years. note: I no longer have publish rights to this module on npm." https://github.com/dominictarr/event-stream/issues/116#issuecomment-440927400 https://github.com/dominictarr/event-stream/issues/116#issue...
- AdmiralAsshat 8y agoThe same thing happened to gorhill and uBlock/uBlock Origin. The takeaway seems to be that you should do a background check on anyone asking to become maintainer of your software. With that said, this thing seems to have blown up because many large companies (Microsoft included) appear to use or depend upon this package. If none of these companies can lend 15 minutes of their engineers' time to help maintain the free software that they leverage, I can certainly understand the author's desire to let the module's maintenance become someone else's problem.
- malikolivier 8y agoIndeed, the author of this package is not at fault here. It is the responsibility of the users depending on this package to check in all their dependencies and ensure to have reproducible builds. I think many maintainers would have done the same.
- czechdeveloper 8y agoThat is just not realistic for most people. Maybe big corps can make that, but even basic things seems to download hundreds of megabytes of dependencies and I could just read for months before I would even start to develop. I for sure miss old times when I got .Net framework, maybe some library from 1 or 2 3rd party vendors and I had all I needed for development.
- hn_throwaway_99 8y agoThe event-stream debacle shows to me how crazy it is that lessons we've known for literally decades seemed to need to be relearned by the Node community every couple months (and I say this as someone who is primarily a Node developer now). Back in the early 00s I worked on a software build system (Java) that had to be able to guarantee reproducibility of past versions of builds for code escrow purposes, and to do that it needed to be able to run builds without a live internet connection to ensure we didn't have unintended external dependencies. The fact that bitpay didn't lock down their version numbers of dependencies, and are thus at the whim of whatever changes upstream of them are gleefully picked up, is crazy, especially for a crypto wallet.
- nepeckman 8y ago> The fact that bitpay didn't lock down their version numbers of dependencies, and are thus at the whim of whatever changes upstream of them are gleefully picked up, is crazy, especially for a crypto wallet. Would that have helped though? This dependency was several layers down, not a direct dependency of copay. I'm under the impression that even if bitpay locked their direct dependency, if that dependency auto updates _its_ dependencies, the result is the same.
- javagram 8y agoThat’s not correct anymore. NPM has a file called “package-lock.json” which locks all dependencies including dependencies of dependencies and so on.
- jbaiter 8y agoFunny thing is: They did actually lock down the version numbers of dependencies, they just didn't bother to check the updated dependencies: https://github.com/bitpay/copay/commit/6cc4b757f6fbd111b9716b50d645390dd1f15105#diff-32607347f8126e6534ebc7ebaec4853dL12251 https://github.com/bitpay/copay/commit/6cc4b757f6fbd111b9716...
- dmortin 8y ago> The fact that bitpay didn't lock down their version numbers of dependencies, and are thus at the whim of whatever changes upstream of them are gleefully picked up, is crazy, especially for a crypto wallet. What it they lock down a version with compromised code in it well before it is discovered? Locking down does not help if checkins are not scrutinized for malicious code.
- dboreham 8y agoOne thing I wonder about when I see this is: Back in the day the source code control systems I used (primarily CVS and Subversion but also others) would send a commit/checkin email that contained the _entire_ set of diffs. As a development lead and manager I made it part of my daily routine to _read_ the checkin emails. Of course I couldn't read every last line of code, but I could certainly spot common mistakes such as checking in extra unrelated files inadvertently; changing tabbing/formatting in code that shouldn't have changed; and often I'd spot bugs in passing. This wasn't the formal code review process, but it kept me up to date on what was going into the repo and it allowed me to catch some basic and obvious errors. Now, back to the future and GitHub and siblings don't do this. I suspect the reason is security : the desire to not have source code floating around in potentially insecure mailboxes. However, for an OSS project the security concern is moot. Reading this history of this attack I feel that had someone been reading commit emails that contained the actual code changed/added, it would have been easy to detect. As it is, the typical GitHub commit notification email tells you almost nothing. You have to click through a link to see the changes (which I'm guessing nobody did in this case).
- Benjammer 8y agoThese kind of attacks can easily just not publish commits to GitHub though. The attack vector is npm, not GH.
- atom_arranger 8y agoThe issue is that the dependency change will show up in the repo as: - "event-stream": "1.8.4" + "event-stream": "1.8.5" Looks completely innocuous, a patch version bump, but it can technically be a completely different package, it may not even have any relation to any open sourced code, people can push anything to npm. People don't check in their dependencies. event-stream is hosted on npm and downloaded by people who download packages depending on it automatically. Given this situation there is no diff of it to view.
- mifreewil 8y agoyeah - thinking it'd be helpful for npm to have a diff command to check source changes when doing upgrades.
- xwvvvvwx 8y agoThis should be on their frontpage: https://copay.io/ https://copay.io/
- deleted 8y ago[deleted]
- ballenf 8y agoAs pointed out by others, the attack vector relied on minified code distributed by NPM being independent from the repository code. Should we move to having production releases do their own minification locally? Or, as others have suggested, use tools to parse source and minified code to identify differences?
- mifreewil 8y agoWith modern build tools like browserify, webpack, rollup, etc. does it really make sense to still have non-apps do minification?