dwyl / learn-security

:closed_lock_with_key: For most technology projects Security is an "after thought", it does not have to be that way; let's be proactive!
67 stars 10 forks source link

NPM package ua-parser-js compromised #77

Open th0mas opened 2 years ago

th0mas commented 2 years ago

From the GitHub security advisory:

The npm package ua-parser-js had three versions published with malicious code. Users of affected versions (0.7.29, 0.8.0, 1.0.0) should upgrade as soon as possible and check their systems for suspicious activity. See this issue for details as they unfold.

Any computer that has this package installed or running should be considered fully compromised. All secrets and keys stored on that computer should be rotated immediately from a different computer. The package should be removed, but as full control of the computer may have been given to an outside entity, there is no guarantee that removing the package will remove all malicious software resulting from installing it.

Current analysis on the malware seems to suggest it will persist after removal of the packages from the infected computer. It seems to export credentials and browser cookie data.

As this malware seems to effect Windows/macOS/Linux and isn't caught by many antivirus tools/the OS a clean install is recommended if any device is affected.

nelsonic commented 2 years ago

@th0mas thanks for sharing. Do you know if any of our projects are using this?

A quick search of @dwyl's code: https://github.com/search?q=org%3Adwyl+ua-parser-js&type=code image

Suggests we aren't using it in any of our projects ... but it might well be somewhere in our great-grand-child dependencies ... 🙄

So stoked that Phoenix has ditched Webpack for build. https://github.com/dwyl/learn-phoenix-framework/issues/143#issuecomment-951845792 so these random Node.js/NPM dependencies should be less of an issue in our Elixir projects.