Critical

Typosquatting Package Name in Install Command

This detects package install commands (pip, npm, etc.) that reference known lookalike package names — ones that differ from a popular package by a character or two. Attackers publish these lookalikes hoping for accidental installs, including cases where an AI assistant suggests the wrong package name.

How the attack works

An attacker registers a package on PyPI or npm with a name nearly identical to a widely used package (e.g. a swapped letter or added hyphen). A developer, script, or AI-generated command misspells the real package name or copies a suggested command containing the typo. The install command runs, pulling down the attacker's package instead of the legitimate one. Malicious code in the typosquat package executes during or after installation, on the developer's machine or in a build pipeline.

Netzilo detection

Netzilo can block this behaviour when it is observed.

Signature ID
c6e0b534-7d4f-4e1c-c6e5-0d3f8e5c4a27
Severity
Critical

Why it matters

A single mistyped or AI-suggested install command can hand code execution to an attacker on a developer workstation or CI/CD system, potentially leading to credential theft, backdoored builds, or supply-chain compromise of downstream users.

What you can do

  • Pin dependencies to exact, verified package names and versions in lockfiles, and review any new dependency before merging.
  • Use a private package registry or proxy that allow-lists known-good package names to block unregistered lookalikes.
  • Review AI-generated install commands manually before running them; do not copy-paste package names without checking the official project source.
  • Set up periodic scanning of your dependency tree against known typosquat name lists.

Known benign look-alikes

  • Legitimate packages with similar names that are not typosquats

Related threats