UPDATED 19:55 EDT / NOVEMBER 26 2018

SECURITY

Bitcoin-stealing code inserted into popular GitHub-hosted JavaScript library

A hacker has successfully inserted bitcoin-stealing code into a popular JavaScript library used by millions including leading companies.

The hack involved the insertion of code into Event-Stream, a JavaScript npm package for working with Node.js streaming data hosted on GitHub with the aim of intercepting bitcoin payments on BitPay’s open-source bitcoin wallet Copay.

Where the story gets interesting is an apparent breakdown in JavaScript library management security starting at the top.

Event-Stream, which is a toolkit designed to make creating and working with streams easy, was first written by a coder called Dominic Tarr, who later gave up on its development despite its popularity.

About three months ago, Tarr gave management rights to the Event-Stream repository to someone by the name of Right9ctrl, and that’s when the code was compromised.

On Sept. 9, version 3.3.6 was published complete with a benign module called flatmap-stream, seemingly as a test to see if anyone would notice a new module. On Oct. 5, the flatmap-stream module was then altered to include malicious code that attempted to steal bitcoin wallets and transfer their balances to a server located in Kuala Lumpur, according to Ars Technica.

The crypto stealing code was subsequently discovered Nov. 20 when a user posted details on the script asking what it was and what was it doing.

The story raises questions about both the risks companies take in using open-source code as well as the security of code repositories themselves.

For years, security researchers have been warning of the risks of using open-source code in larger projects. Open-source repository GitHub, now owned by Microsoft Corp., has also had its own issues.

That a highly popular library was simply handed over to someone with seemingly little to no history on GitHub is where the security considerations come in. GitHub does entrust existing code developers to make decisions on who should be in control of projects but in this case, access was handed over to some will nefarious intent with absolutely zero checks and balances.

“Nothing’s stopping this happening again, and it’s terrifying,” software engineer Chris Northwood wrote on Medium. “The Hacker News and GitHub threads on the issue quickly denigrated into a blame game, pulling out license clauses and debating what open source etiquette means. However, this is no one person’s fault, it’s a systemic failure that has led to this.”

Photo: 48598045@N07/Flickr

A message from John Furrier, co-founder of SiliconANGLE:

Support our open free content by sharing and engaging with our content and community.

Join theCUBE Alumni Trust Network

Where Technology Leaders Connect, Share Intelligence & Create Opportunities

11.4k+  
CUBE Alumni Network
C-level and Technical
Domain Experts
15M+ 
theCUBE
Viewers
Connect with 11,413+ industry leaders from our network of tech and business leaders forming a unique trusted network effect.

SiliconANGLE Media is a recognized leader in digital media innovation serving innovative audiences and brands, bringing together cutting-edge technology, influential content, strategic insights and real-time audience engagement. As the parent company of SiliconANGLE, theCUBE Network, theCUBE Research, CUBE365, theCUBE AI and theCUBE SuperStudios — such as those established in Silicon Valley and the New York Stock Exchange (NYSE) — SiliconANGLE Media operates at the intersection of media, technology, and AI. .

Founded by tech visionaries John Furrier and Dave Vellante, SiliconANGLE Media has built a powerful ecosystem of industry-leading digital media brands, with a reach of 15+ million elite tech professionals. The company’s new, proprietary theCUBE AI Video cloud is breaking ground in audience interaction, leveraging theCUBEai.com neural network to help technology companies make data-driven decisions and stay at the forefront of industry conversations.