Join our Newsletter — 33% off our NHI Course
Home› Glossary› Cyber Security› Namesquatting
Cyber Security

Namesquatting

← Back to Glossary
By NHI Mgmt Group Updated October 30, 2026 Domain: Cyber Security

Namesquatting is the practice of publishing a package with a name designed to look like a legitimate one so a developer installs the wrong software. It includes typosquatting, combosquatting, and brandsquatting. The goal is to exploit trust, typing mistakes, or name recognition during package selection.

What namesquatting means in software distribution

Namesquatting is a supply-chain abuse pattern, not just a naming trick. The attacker relies on the fact that package registries are crowded and developers often search by memory, autocomplete, or partial recognition, so a lookalike package name can be enough to win installation.

The technique works because package selection is a trust decision. A developer may believe they are pulling in a known dependency, but the registry entry, package metadata, and code provenance all belong to someone else. That makes namesquatting effective even when the malicious package is technically valid and publicly available.

How namesquatting variants work

Namesquatting is an umbrella term for several related naming patterns. Typosquatting uses common misspellings or character transpositions. Combosquatting combines a legitimate brand or package word with another term to create a believable variant. Brandsquatting copies or closely imitates a real product, project, or vendor name so the malicious package appears familiar at a glance.

These variants differ in style, but the underlying mechanism is the same: they exploit human pattern recognition. The more popular the target package, framework, or library, the more likely a false name will look credible inside a dependency search, package manager, or build pipeline.

Why namesquatting is dangerous

The immediate danger is that the wrong package can execute during install, build, or runtime. Once that happens, the attacker may gain code execution in a developer workstation, CI runner, container build, or application environment, depending on where the dependency is introduced.

Because software packages often run with broad build-time trust, the impact can extend beyond a single import. A malicious package can steal tokens, alter build artifacts, exfiltrate source code, or implant persistence into the development workflow. That is why package naming abuse belongs in the same defensive conversation as dependency integrity and build provenance.

Namesquatting also works well as a low-friction delivery path because package ecosystems are large, decentralised, and constantly changing. Defenders need to treat registry search results, dependency manifests, and package updates as security-relevant inputs, not just developer convenience features.

Detection and prevention in package workflows

Defence starts with inventory and verification. Organisations should know which packages are approved, who publishes them, and whether a new dependency matches an expected maintainer, namespace, or source repository. A package name alone is never enough evidence that it is legitimate.

Build and dependency controls should reduce reliance on ad hoc human selection. NIST SP 800-53 Rev 5 Security and Privacy Controls is useful here because it ties software integrity, configuration management, logging, and access control to concrete defensive practice. SLSA is also relevant because package provenance and build integrity reduce the chance that a lookalike dependency is accepted without scrutiny.

Package managers, internal mirrors, lockfiles, allowlists, and signed artifacts all help, but they are strongest when combined with review of the full dependency chain. If a package name is unfamiliar, teams should validate the publisher, upstream repository, and install behaviour before it is admitted into a build.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

NIST SP 800-53 Rev 5, SLSA and OWASP ASVS set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
NIST SP 800-53 Rev 5SI-7 — Software, Firmware, and Information IntegrityNamesquatting exploits untrusted software intake and integrity gaps.
CM-8 — System Component InventoryExposure depends on knowing which packages and components are in use.
Recommendation — Verify package integrity and provenance before allowing dependencies into builds. Maintain a current dependency inventory and flag unapproved packages.
SLSASupply-chain Levels for Software ArtifactsNamesquatting is a software supply-chain integrity problem tied to artifact provenance.
Recommendation — Require provenance and build integrity controls before consuming third-party packages.
OWASP ASVSV15 — Secure Coding and ArchitectureLookalike dependencies affect secure architecture and dependency handling in applications.
Recommendation — Review dependency selection and source trust as part of secure software design.

Practitioner Guidance

Why practitioners should care: Namesquatting is effective because it attacks a routine workflow, not a rare edge case. Dependency intake is often automated, so one mistaken selection can propagate into many builds or deployments before anyone notices.

Common misunderstanding: Teams sometimes assume that a public registry entry is legitimate simply because it exists or because the package name looks close to the intended one. In practice, the safer assumption is the opposite: lookalike names deserve extra scrutiny until publisher identity and artifact provenance are confirmed.

Practitioner takeaway: Treat package names as untrusted until the source, maintainer, and artifact integrity checks all agree, especially for new dependencies and package updates.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Reviewed and updated by the NHIMG editorial team on October 30, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org