Rapid Response: Finding NPM libs 'colors' and 'faker'

by

On January 9, 2022, journalist and researcher Ax Sharma wrote an article, "Dev corrupts NPM libs 'colors' and 'faker' breaking thousands of apps".

From Ax

Users of popular open-source libraries 'colors' and 'faker' were left stunned after they saw their applications, using these libraries, printing gibberish data and breaking. Some surmised if the NPM libraries had been compromised, but it turns out there's much more to the story.

The developer of these libraries intentionally introduced an infinite loop that bricked thousands of projects that depend on 'colors' and 'faker.' 

The colors library receives over 20 million weekly downloads on npm alone and has almost 19,000 projects relying on it. Whereas, faker receives over 2.8 million weekly downloads on npm, and has over 2,500 dependents.

JupiterOne response to our clients

We have created a set of J1 queries for our customers to quickly find if they are using the affected libraries. If you aren't using J1 yet, you can get a free lifetime license and run the queries immediately. 

To ingest NPM dependency data into your graph, you could use the npm-inventory script from our secops-automation-examples repo.

Find vulnerable 'faker' packages

This query searches for known-vulnerable npm 'faker' packages:

Find npm_package
with displayName='faker'
that USES as u CodeRepo
where u.version='6.6.6'
return TREE

 

Find vulnerable 'colors' packages

This query searches for known-vulnerable npm 'faker' packages:

Find npm_package
with displayName='colors'
that USES as useRelationship CodeRepo
WHERE useRelationship.version = ('1.4.2' OR '1.4.1' OR '1.4.44-liberty-2')
return TREE

 

If you'd like to be notified as more Rapid-Response announcements are created, please sign up for the newsletter. 

JupiterOne Team
JupiterOne Team

The JupiterOne Team is a diverse set of engineers and developers who are working on the next generation of cyber asset visibility and monitoring.

Keep Reading

JupiterOne 2024: A Year of Innovation and Impact | JupiterOne
December 30, 2024
Blog
JupiterOne 2024: A Year of Innovation and Impact

Discover JupiterOne's 2024 milestones! From upgrading our Security Graph for faster insights to launching features like CTEM, CCM, Unified Device, and Rule Packs.

Proactive IAM Security: Transforming Identity Security with Actionable Insights | Okta Integration with JupiterOne
December 19, 2024
Blog
Unlocking Proactive Security: How Okta and JupiterOne Elevate IAM Insights

Unlock proactive IAM security with Okta and JupiterOne, gaining real-time insights, enforcing least privilege, and reducing risks in dynamic cloud environments.

Transitioning from Vulnerability Management to Exposure Management | JupiterOne
December 13, 2024
Blog
Transitioning from Vulnerability Management to Exposure Management with JupiterOne

Explore Gartner's latest report on Exposure Management and learn how your organization can prioritize vulnerabilities and minimize exposures.

15 Mar 2022
Blog
One line headline, one line headline

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud eiut.

15 Mar 2022
Blog
One line headline, one line headline

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud eiut.

15 Mar 2022
Blog
One line headline, one line headline

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud eiut.