Armando identified standforusz v1.0.3 as a malicious npm package published on May 12, 2023, that bundles obfuscated JavaScript designed to inject a phishing login page into any web application that imports it. The package had accumulated 720 total downloads before npm quarantined and removed it, replacing it with a security holding package. This is a browser-side supply chain attack -- no install-time hook fires during npm install, but any web page that loads the package's JavaScript silently renders a fake "Sign in to your account" credential harvesting form in the browser.
Key Findings
- Malicious version: v1.0.3, published 2023-05-12; no clean predecessor exists
- Entry point: Import-time execution -- malicious JS runs when the browser loads jquery.min.js from the package
- Targets: Web browsers -- injects phishing HTML via document.write() into any page that loads the package
- Evasion: Payload is hex-encoded and HTML-entity-encoded across two files; the phishing page is fetched at runtime from the npm CDN, not stored as plaintext
- Detection: Script-JS.Downloader.SupplyChain, Script-JS.Infostealer.SupplyChain, Text.Infostealer.SupplyChain
Package Background
standforusz presents itself as a generic JavaScript utility but has no documented purpose, no source code repository, and no maintainer profile beyond an email address. It was first published on May 11, 2023, and the malicious v1.0.3 appeared the next day. The package accumulated 720 total downloads and 1 direct dependent before npm acted. All versions published by this account are malicious, and the package is part of a broader cluster of similarly structured phishing npm packages discovered in the same period, including tetusdgsudgs, react-vuejs, jqueryoffline, vueofflinez, and jquerydownloadnew.
Attack Analysis
The attack is a two-stage browser-side phishing injection. The package includes two JavaScript loaders and a phishing payload.
The first loader, jquery.min.js, uses a hex-encoded string array to store a URL pointing to cdn.jsdelivr.net/npm/standforusz@1.0.3/DEMO.txt. At runtime it calls fetch() on that URL, then passes the response through a decodeHtml() function that decodes HTML entity sequences, and finally calls document.write() to inject the decoded HTML into the current page. The attacker deliberately uses the npm CDN as a delivery mechanism for the payload so the URL resolves to a legitimate-looking jsdelivr.net address.