Safeguard
Security Guides•

How do I report a malicious package to npm or PyPI?

Where and how to report a malicious package on npm and PyPI, what evidence to include, and how a malware report differs from a vulnerability report.

Safeguard Security Team
3 min read

On npm, open the package page and use the Report malware button. On PyPI, sign in, open the project and use Report project as malware in the sidebar. Include the package name, affected versions and evidence. Vulnerabilities are different: send those privately to maintainers.

Malware report or vulnerability report?

SituationWhere it goes
The package is built to do harm (credential theft, backdoor, typosquat)The registry's malware report
A legitimate package has a security flawThe maintainers, privately
A flaw in the registry itselfThe registry's security contact

npm's documentation says vulnerabilities in npm packages should be reported directly to the package maintainers, and that you can find contacts with npm owner ls.

Reporting on npm

The documented steps:

  1. Gather the package name and all affected versions.
  2. Open the package page and choose Report malware.
  3. Enter your name, a contact email, the package name and versions, and describe what the malware does.
  4. Include references, commits or code examples that would help researchers confirm it.
  5. Send the report.

npm says its security team confirms the report, removes the package, publishes a security placeholder and issues an advisory.

Reporting on PyPI

The PyPI security page describes this path:

  1. Log in and go to the project page.
  2. Click Report project as malware at the bottom of the sidebar.
  3. Give the project URL, an explanation of why it is a security issue, and a link to the problematic lines in its distributions through inspector.pypi.io.

The page lists typo-squatting, dependency confusion, data exfiltration, obfuscation and command and control among the valid reasons. For security issues in PyPI itself, it asks you to email security@pypi.org and not to report publicly. It says to expect acknowledgment within 48 hours.

PyPI's acceptable use policy also bars using PyPI to deliver malicious executables or act as attack infrastructure.

Other registries

Check each registry's own security or policies page for the current reporting route. We did not confirm a process for every registry, so look up the right one before you write the report.

What makes a report useful

  • Exact name and versions, with the publish time.
  • The specific file and lines that do the harm.
  • What it does, for example which data it reads and where it sends it.
  • Do not run it again to demonstrate it. Static evidence is enough.

While you wait, remove it from your own projects. See what to do after installing a malicious package.

Quick check

Should I post about it publicly first?

Report privately first so the registry can act quickly. A public post can help others but should follow, not replace, the report.

What if the package is vulnerable but not malicious?

Contact the maintainers privately. That is the route npm's documentation gives for vulnerabilities.

Safeguard does SBOM and dependency scanning, and a free scan lists the packages you may want to check first.

Sources

Last reviewed: 19 October 2026.

Never miss an update

Weekly insights on software supply chain security, delivered to your inbox.

Self-healing security runs on Safeguard.

Your first fix PR is minutes away.

No sales call required, even your agent can complete the purchase over MCP.