From CISO Marketplace — the hub for security professionals Visit

Package Manager Poisoning

Malware Protection

Definition

An attack distributing malicious code through public package registries (npm, PyPI, RubyGems, Maven) by compromising existing packages, publishing typosquatted packages, or exploiting maintainer account takeovers.

Technical Details

Package registries are soft targets because they prioritize developer convenience over security. Attack vectors include: hijacking abandoned or weakly-secured maintainer accounts, typosquatting popular package names, inserting malicious post-install scripts, and publishing packages that impersonate deprecated libraries. Defenses include 2FA enforcement for registry accounts, code signing (Sigstore), and runtime dependency integrity verification.

Practical Usage

Development organizations should maintain an approved package allowlist, enforce dependency hash pinning in lock files, and monitor for new versions of critical dependencies before auto-upgrading. Security teams should subscribe to registry abuse report feeds and implement SBOM-based compliance scanning in CI pipelines.

Examples

Related Terms

Dependency Confusion Attack Supply Chain Attack Typosquatting Attack CI/CD Pipeline Security SLSA Framework
← Back to Glossary