DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
  1. DZone
  2. Coding
  3. JavaScript
  4. Widely Used JavaScript Library Had a Backdoor to Steal Bitcoin

Widely Used JavaScript Library Had a Backdoor to Steal Bitcoin

Malicious code designed to steal Bitcoin was hidden in an npm package for weeks. Once it was discovered, it took developers a week to even figure out what it did.

Kara Phelps user avatar by
Kara Phelps
·
Nov. 27, 18 · News
Like (4)
Save
Tweet
Share
11.15K Views

Join the DZone community and get the full member experience.

Join For Free

Multiple tech news sites have reported that  event-stream , a popular JavaScript library with almost two million weekly downloads, contained malicious code for several weeks. It was first reported in a GitHub post last week, but developers were only able to decipher the purpose of the code yesterday. The code targeted users of the cryptocurrency wallet Copay, and was designed to steal Bitcoin and Bitcoin Cash.

GitHub user right9ctrl injected the malicious code in a package called flatmap-stream after offering to help maintain the library, according to a post on the Snyk security blog. Handing off control to other users happens frequently in open source communities, as the original authors and maintainers move on to other projects. Adding libraries as dependencies is also common in open source, although the  event-stream npm package hadn't been substantially updated for about two years prior to September 2018, when flatmap-stream was first added. According to Ars Technica, the next phase took place on October 5, when malicious code was implemented to transfer the balances of Copay wallets to a server in Kuala Lumpur. 

Copay published a blog post on Monday warning users of versions 5.0.2 through 5.1.0 not to open the app until they had installed version 5.2.0, which includes a security update to protect against the npm package vulnerability.

ZDNet reports that the malicious event-stream version 3.3.6 has been taken down from npmjs.com repository, and also advised project maintainers to update their dependency trees to the latest version available, 4.0.1. 

In early January, David Gilbertson wrote a post on Hackernoon theorizing how a similar situation might unfold: "I'm Harvesting Credit Card Numbers and Passwords From Your Site. Here's How."

Open-source security vulnerabilities that target end users are becoming more common. The volunteer-run nature of the libraries, combined with their extreme popularity, creates opportunities for hackers to implement malicious updates under the radar.

Last month, Ars Technica reported on two such attacks. VestaCP servers were compromised to allow end users to download a malicious installer. Also, "Colourama," a doppelganger of the popular Colorama package in the PyPI repository, was found to be monitoring users' clipboards for signs they were about to make a cryptocurrency payment. Any transfers were diverted directly into the wallet of an attacker.

JavaScript library Bitcoin Open source Backdoor (computing)

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Debugging Threads and Asynchronous Code
  • Mr. Over, the Engineer [Comic]
  • Image Classification With DCNNs
  • Simulate Network Latency and Packet Drop In Linux

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: