Skip to main content
MalwarePublished Updated

nhmpy (PyPI) · Malicious Code

Affects nhmpySource GCVE Database

0

Malicious package : remove nhmpy and rotate any secrets on hosts that installed it.

Data as of 11 Jul 2026, 09:43 UTC

Classification

Malicious package

Published to PyPI · OSV MAL-2026-5302

What to do

Remove nhmpy from every project, lockfile and image that pulls it in. Treat any host that installed it as compromised: rotate the credentials, tokens and keys it could read, from a clean machine.

Affected software

ProductAffectedFixed in
PyPInhmpyAffected
  • =2.4.6
  • =2.4.7
Fixed in–

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

Description

--- _-= Per source details. Do not edit below this line.=-_ ## Source: amazon-inspector (34db1950ee9bdf9c75ae9bb2436085bbb443107321d8d7056a0bf3b8fae36978) 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 <numpy-discussion@python.org>', 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. ## Source: kam193 (0b2d6b794431c52ef6b905eb676d70274a792cbca1b266a3405734a7a900860b) 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

References

Community reviews

Loading reviews…