pystr-codec runs a credential-stealing worm through a Python startup file ×
malicious Covers 0.1.0, 0.1.1 and 0.1.2 Reviewed by Bitbison Updated 2026-11-01
pystr-codec installs a .pth file that runs obfuscated JavaScript through Bun at every Python start. It reads other tools' credential stores, sends them out, persists, spreads with the stolen credentials, and turns destructive once they are revoked. A Miasma-family worm.
What it does
pystr-codec installs a startup file, pystr_codec-setup.pth, into the environment's site-packages. Python processes .pth files at every interpreter start, so the payload runs whenever any Python program in that environment starts, whether or not pystr-codec is ever imported. It uses the Bun JavaScript runtime to run obfuscated JavaScript shipped in the package (pystr_codec/ci.js).
In a run of 0.1.1, that code read 47 credential stores belonging to other tools and then connected to paleasbest.top. The OpenSSF record describes the rest: it exfiltrates the credentials it finds to a public GitHub repository, persists and waits for remote commands, tries to spread using the credentials, periodically checks whether they are still valid, and takes destructive action on the machine once they are revoked. The record places it in the Miasma worm family, also known as testmetest.
Timeline
Reported to the OpenSSF malicious packages database as MAL-2026-18432: 2026-11-01 00:13 UTC, covering 0.1.0, 0.1.1 and 0.1.2.
PyPI has quarantined the project: it is kept, but no files are served.
Indicators hosts paleasbest.toprequests https://paleasbest.top/v1/apifiles site-packages/pystr_codec-setup.pthsite-packages/pystr_codec/ci.js
Links