Malicious code in @user-interface-common/common-styles (npm)
Description
npm user 'conx3993' published this package in a dependency confusion campaign. It squats a name that looks like an internal package and uses version 66.1.6 so misconfigured resolvers pick it over the real one. Version 0.0.0-stage is an empty placeholder. A 'preinstall' hook runs 'index.js', which poses as an IP geolocation helper. On install it sends an HTTPS GET to attacker-controlled host realwbx.com (/ip.php?ip=8.8.8.8) with a hard-coded 'Authorization' value ('bddd640d75c36bd562755a0044764366') unique to this package, then discards the response. The token tells the operator which internal package name the victim installed, and the request reveals the victim's public egress IP.
--- -= Per source details. Do not edit below this line.=-
Source: amazon-inspector (c42cb769de386a9960f414c50f8e5ce947efc022fce653c3d2ba1f5e7e1abbd5)
The npm package @user-interface-common/common-styles declares a preinstall lifecycle script that runs index.js on every install. index.js performs an HTTPS GET to realwbx.com/
Source: ghsa-malware (5f0e98e3dc5c4b5d270667f55fe4ad37808e127735d93f3321e9e7c9831cb71d)
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.