Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

Malicious code in nhmpy (PyPI)

0
Critical
Published: 06/08/2026 (06/08/2026, 07:49:44 UTC)
Source: GCVE Database
Product: nhmpy

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 <[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. ## 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

Affected software

PyPIghsa
nhmpy
Affected versions
=2.4.6=2.4.7

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 07/09/2026, 09:52:39 UTC

Technical Analysis

The 'nhmpy' package is a malicious typosquatting package on PyPI that mimics the legitimate 'numpy' package by copying its source code and metadata to deceive users. Although the initial 2.4.6 version does not execute malicious code, subsequent analysis revealed that the package was published from a compromised account and contains a heavily obfuscated JavaScript infostealer executed via the Bun runtime on Python startup. This infostealer harvests a wide range of sensitive information including environment variables, cloud tokens, credentials, cryptocurrency assets, and password manager data. It also attempts to maintain persistence, propagate by publishing infected packages using stolen credentials, and exfiltrates data likely through GitHub. The code includes sandbox detection and may perform destructive actions such as wiping user data if invalid GitHub tokens are detected. This campaign is associated with the Mini Shai Hulud threat actor group and represents a high-risk supply chain attack vector.

Potential Impact

Users who install the 'nhmpy' package risk having sensitive credentials and secrets exfiltrated, including API keys, cloud tokens, password manager data, and cryptocurrency assets. The infostealer can also attempt to maintain persistence and spread by publishing additional infected packages using stolen credentials. There is a potential for destructive actions such as data wiping if certain conditions are met. This compromises the confidentiality and integrity of affected systems and credentials. The deceptive naming and metadata increase the risk of accidental installation by users expecting the legitimate 'numpy' package.

Mitigation Recommendations

Users should avoid installing the 'nhmpy' package and verify package names carefully before installation to prevent typosquatting attacks. Since this is a malicious package published from a compromised account, the PyPI registry maintainers should be contacted to remove the package and prevent further distribution. Users who have installed 'nhmpy' should perform a thorough security audit of their environment, including credential rotation and malware scanning. Cleanup should be done cautiously due to the potential destructive payload. No official patch or fix exists for this malicious package; remediation relies on removal and credential management.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Gcve Source
db.gcve.eu
Osv Id
MAL-2026-5302
Osv Schema Version
1.7.4
Aliases
[]
Ecosystems
["PyPI"]
Database Specific Severity
null
Cvss Version
null

Threat ID: 6a4f6c3968715ace431588d9

Added to database: 07/09/2026, 09:39:05 UTC

Last enriched: 07/09/2026, 09:52:39 UTC

Last updated: 07/29/2026, 18:25:36 UTC

Views: 9

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses