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 instructor-mcp (PyPI)

0
Critical
Published: 06/06/2026 (06/06/2026, 06:13:57 UTC)
Source: GCVE Database
Product: instructor-mcp

Description

--- _-= Per source details. Do not edit below this line.=-_ ## Source: amazon-inspector (6db8a103a73261cd6de8f763fa639d1bd148124ca661893e9d3ab73cd76ab50b) instructor-mcp 1.15.2 is a typosquat of the legitimate `instructor` PyPI library (it copies the same author names, README, and repository URL `github.com/instructor-ai/instructor`) and ships an additional file `instructor-setup.pth` that the Python interpreter auto-executes on every `python` invocation after install. The.pth file uses an obfuscated single-line `exec(...)` with mangled aliases (`_o,_s,_u,_p,_y,_h,_g`) to bypass the `.pth` rule that only `import` lines execute. The exec body downloads the Bun JavaScript runtime from `https://github.com/oven-sh/bun/releases/download/bun-v1.3.13/bun-{platform}-{arch}.zip` to `/tmp/b/bun`, chmods it executable, then searches `sys.path` for a file named `_index.js` and runs it via `bun run _index.js`. Execution is gated by `/tmp/.bun_ran` so it fires once per host. There is no hash/signature check on the downloaded runtime, and the JS payload is whatever `_index.js` happens to be present on `sys.path` (shipped by a co-installed package or planted by a separate component) — bypassing Python static analysis entirely. This is the alternate-runtime-dropper pattern: arbitrary attacker-controlled JS is executed under a freshly downloaded non-Python runtime, with persistence via the.pth auto-load mechanism. ## Source: kam193 (d22e882ab0d869a60fcff314b04f0534f3622d7719ed3a9101d55bb6c81dcbc9) Versions 1.15.2, 1.15.3 were compromised. Compromised packages start 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
instructor-mcp
Affected versions
=1.15.2=1.15.3

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/10/2026, 09:42:56 UTC

Technical Analysis

The instructor-mcp PyPI package versions 1.15.2 and 1.15.3 are compromised typosquats of the legitimate instructor package. They deploy a malicious .pth file that auto-executes on Python interpreter startup, running obfuscated code that downloads the Bun JavaScript runtime without integrity checks. This runtime executes a JavaScript infostealer payload (_index.js) that collects a wide range of sensitive information including environment variables, cloud tokens, credentials, cryptocurrency assets, and password manager data. The malware also attempts to maintain persistence and propagate by publishing infected packages using stolen credentials. It includes destructive functionality threatening to wipe user data if invalid GitHub tokens are found. The attack bypasses Python static analysis by executing code in an alternate runtime. This campaign is associated with the Mini Shai Hulud threat group and exhibits multiple malicious behaviors including sandbox detection, obfuscation, and data exfiltration.

Potential Impact

This malicious package compromises user security by stealing sensitive information such as API keys, package repository credentials, cryptocurrency assets, and password manager data. It can exfiltrate data likely via GitHub and attempts to maintain persistence and spread by publishing infected packages. The destructive payload may wipe user data under certain conditions, posing a risk of data loss. The use of an alternate runtime (Bun JavaScript) bypasses Python security controls, increasing the difficulty of detection and mitigation.

Mitigation Recommendations

Users should immediately uninstall instructor-mcp versions 1.15.2 and 1.15.3 if present. Avoid installing packages from untrusted or typosquatted sources. Since no official patch or fix is available, remediation involves removing the malicious package and any related artifacts. Exercise caution during cleanup to avoid triggering destructive payloads. Monitor for suspicious activity related to stolen credentials and consider rotating exposed secrets. There is no vendor advisory indicating an official fix; patch status is not yet confirmed — check trusted sources for updates.

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-5317
Osv Schema Version
1.7.4
Aliases
[]
Ecosystems
["PyPI"]
Database Specific Severity
null
Cvss Version
null

Threat ID: 6a50ba5668715ace4357eeb8

Added to database: 07/10/2026, 09:24:38 UTC

Last enriched: 07/10/2026, 09:42:56 UTC

Last updated: 07/25/2026, 15:26:36 UTC

Views: 68

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