Advisory

MAL-2026-5280

Also known as: PYSEC-2026-578

Malicious package Its source marks this package as malicious: it is not a vulnerability in a legitimate one.

Summary

Malicious code in bramin (PyPI)

Details

---
_-= Per source details. Do not edit below this line.=-_

Source: amazon-inspector (1fb2ac40fcb4626c5e7dea5e26951bc0965b39a1eb721c1a8f23846f421a5827)
bramin ships a bramin-setup.pth file that Python auto-executes at every interpreter startup (system-wide, not only when bramin is imported). The.pth contains a single-line obfuscated payload using single-letter aliases (_O, _T, _G, _o, _s, _u, _p, _y, _b, _z, _zf) that, on first run, downloads the Bun JavaScript runtime from https://github.com/oven-sh/bun/releases/download/bun-v1.3.13/bun-<platform>-<arch>.zip, stages the binary to /tmp/b/bun, chmods it executable, and invokes bun run against a sibling _index.js discovered via dirname(__file__) with a glob fallback. A guard file /tmp/.bun_ran ensures the dropper fires only once per machine to evade observation. Several signals confirm malicious intent: (1) the package advertises itself only as a 'pipe operator syntax' Python library and has no legitimate need for a JavaScript runtime; (2) _index.js is not listed in the wheel's RECORD manifest, meaning the executed JS payload is smuggled in or supplied by a later/sibling drop and is not covered by the distribution's integrity metadata; (3) __init__.py declares __version__ = '0.0.1' while the dist-info is 0.0.3, a version-drift fingerprint consistent with an additive-only republish bolting the dropper onto a previously legitimate release; (4) the obfuscation shape (chained exec() of a one-line string with aliased imports) has no benign explanation for a.pth file, whose legitimate purpose is sys.path mutation. Installer impact: arbitrary attacker-controlled JavaScript execution on the installer's machine on the very next Python invocation after pip install bramin, with the executed bytes (_index.js) outside the wheel's signed manifest and therefore mutable by the attacker at any time.

Source: kam193 (5933ebb330070d47683cbb0b04b4a8805db94d845d0efde3a592e178a0092769)
Versions 0.0.2, 0.0.3, 0.0.4 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

Severity

Not rated by the source.

Dates

Published
2026-06-06 06:13 UTC
Modified
2026-06-29 21:11 UTC

Affected packages and fixes

bramin

PyPI · All systems

Affected

  • Versions: 0.0.2, 0.0.3, 0.0.4

Fixed versions

None listed

Fix

No fixed version is listed.

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: OpenSSF Malicious Packages · Apache-2.0

Sources & licences