MAL-2026-5302 Malicious code in nhmpy (PyPI)

Malicious package Published
Package
nhmpy
Registry
PyPI

What is MAL-2026-5302?

MAL-2026-5302 is a malicious package in nhmpy, published on 8 Jun 2026.

Official description

The package is published as 'nhmpy' on PyPI but its contents are a verbatim copy of NumPy 2.4.6: the same source tree, docstrings, and license files. The distribution metadata falsely identifies the package as authored by 'Travis E. Oliphant et al.' and maintained by 'NumPy Developers <[email protected]>', with Project-URL pointing at https://numpy.org. Internal modules still import from the real 'numpy' namespace (e.g., nhmpy/init.py line 788: from numpy._pytesttester import PytestTester), so the package masquerades as numpy and depends on numpy being installed alongside it. The current 2.4.6 contents do not execute install scripts, perform network I/O at import, or contain obfuscated code — there is no active exfiltration or RCE payload in this version. However, the name is a one-character edit from 'numpy' (a top-tier PyPI package) and the metadata is deliberately deceptive about authorship, which is the precondition for a future malicious release under the same name. Routing for human review of the name-confusion claim and possible registry takedown.

Typosquatting package published from a compromised account with an obfuscated infostealer. The infostealer is a heavily obfuscated JavaScript code executed using Bun runtime on Python startup. It collectes all kinds of sensitive data, including API keys, credentials to package repositories, cryptocurrency assets, password manager data. Infostealer actively queries online services to collect additional secrets as well as attempts to gain persistence and spread further by publishing infected packages using collected credentials. Data are exfiltrated likely using Github. The code seems to threaten to wipe the user's data if it detects invalid GitHub tokens. Cleanup should be done with caution.

It seems to be related to the recent Mini Shai Hulud campaign.


Category: MALICIOUS - The campaign has clearly malicious intent, like infostealers.

Campaign: 2026-06-compr-woodpecker

Reasons (based on the campaign):

  • compromised-package

  • exfiltration-env-variables

  • exfiltration-cloud-tokens

  • exfiltration-credentials

  • abuses-pth

  • obfuscation

  • infostealer

  • The package contains code to detect if it is running in a sandbox environment.

  • exfiltration-crypto

  • files-exfiltration

  • destructive-actions

What should I do about MAL-2026-5302?

Remove the package from your dependencies and lockfiles, then rotate any secrets on machines where it was installed.

Sources

Also known as PYSEC-2026-583.

Is MAL-2026-5302 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free