Typosquatting
Typosquatting is when someone registers a domain name or package name that is a common misspelling or lookalike version of a legitimate one, hoping to capture traffic or installations intended for the real target. This technique is often used by criminals to deceive users into visiting fraudulent websites or installing malicious software packages. It is a form of cybersquatting that exploits simple typographical errors made by users.
Typosquatting is a deception technique in which an adversary registers domain names, package names, or other identifiers that are visually or typographically similar to legitimate ones, typically through character substitution, omission, transposition, or addition. In the context of application security and software supply chains, typosquatting commonly targets package registries (such as npm, PyPI, or RubyGems) where attackers publish malicious packages with names resembling popular libraries, aiming to exploit developer mistakes during dependency installation. In the domain name context, it involves registering misspelled or lookalike domains to intercept web traffic intended for legitimate organizations. Detection of typosquatting in package ecosystems typically relies on name-similarity analysis and behavioral heuristics, though false negatives may occur when attackers use subtle character variations or target less popular packages with limited monitoring. False positives can arise when legitimate packages have naturally similar names.
Why it matters
Typosquatting poses a significant threat to both end users and software development organizations because it exploits one of the most difficult vulnerabilities to eliminate: human error. A single typographical mistake when entering a URL or specifying a dependency in a project manifest can redirect a user to a fraudulent website or pull a malicious package into a software build. In the domain name context, attackers use typosquatted domains to host phishing pages, distribute malware, or harvest credentials. In the software supply chain context, malicious packages uploaded to public registries such as npm, PyPI, or RubyGems can execute arbitrary code during installation, potentially compromising developer workstations, CI/CD pipelines, and production environments.
The challenge is compounded by the scale of modern software ecosystems. Organizations typically depend on hundreds or thousands of open-source packages, and a single misspelled package name in a configuration file may go unnoticed during code review. Because typosquatting exploits the trust developers place in package registries and the speed at which dependencies are resolved, it can bypass many traditional security controls that focus on known vulnerabilities rather than deceptive naming. Detection mechanisms that rely on name-similarity analysis and behavioral heuristics help, but they face inherent limitations: subtle character variations (such as substituting visually similar Unicode characters) may evade detection, and legitimate packages with naturally similar names can trigger false positives.
Who it's relevant to
Inside Typosquatting
Common questions
Answers to the questions practitioners most commonly ask about Typosquatting.