DEV Community

Liran Tal
Liran Tal

Posted on • Edited on • Originally published at lirantal.com

Did you hear about the malicious backdoor discovered in the popular bootstrap-sass Ruby gem?

I recently shared the outline of events and technical details behind the backdoor that was wisely hidden in the 3.2.0.3 version of bootstrap-sass, a popular ruby gem that was downloaded 28 million times since added to the repository 8 years ago.

The malicious version allowed remote attackers to dynamically execute code on servers hosting the vulnerable versions, by sending a specially crafted HTTP request that hides the payload in an innocent-looking cookie 🍪.

As there are no logs and evidence to trace back how this happened, the maintainers suspect that the gem was published using a compromised account of one of the two of them who had publish access.

We've heard stories of this happening before in the JavaScript community as well. On good example for this is the eslint-scope package.

What can we do about it?

I can't stress enough how important it is for maintainers, and developers in general to bump up their security game. I have compiled a list of 10 npm security best practices for JavaScript developers, and at the very least enabling 2FA on the RubyGems repository is a must.

If you're using Snyk, we already updated our vulnerability database to alert in-case you are using the malicious version.

Top comments (0)

Some comments may only be visible to logged-in visitors. Sign in to view all comments.