What is typosquatting?

Updated

Typosquatting is publishing a package whose name is almost the same as a popular one, such as a missing letter or a moved hyphen, hoping someone mistypes an install command.

Why does it matter?

One slip at the keyboard installs the attacker's code. The real package and the copy can look alike in a list.

How do I stay safe?

  • Read the name letter by letter before you press Enter.
  • Copy names from the project's own page, not from memory.
  • Compare weekly downloads with the package you meant.
  • Install through crowsnest install.

What this does not do

This page defines the term. A name that is close to a popular one is a warning sign, not proof. Crowsnest only checks installs run as crowsnest install.

Where do I read more?

Related terms: slopsquatting and dependency confusion. Read How to stay safe from malicious packages, or see the FAQ. Back to the glossary.