Malicious code in pystr-codec (PyPI)
- GHSA-f93h-mc69-274w
Description
Package embeds a malicious PTH file that on every Python startup executes obfuscated JavaScript code, using a Bun engine. It then exfiltrates credentials to a public Github repository, establishes persistence awaiting remote commands, attempts spreading using discovered credentials as well as periodically checks if discovered credentials are valid. Once they are invalidated, it performs destructive actions on the local machine. It seems to be part of the Miasma-family worm (also known under testmetest). --- Category: MALICIOUS - The campaign has clearly malicious intent, like infostealers. Campaign: 2026-11-pystr-codec Reasons (based on the campaign): - obfuscation - abuses-pth - infostealer - worm - backdoor - persistence - exfiltration-credentials - destructive-actions --- Credit: [OpenSSF](https://github.com/ossf/malicious-packages) ([source](https://github.com/ossf/malicious-packages/blob/819afc73054b00d0f063859694cf3b0ff1f52d53/osv/malicious/pypi/pystr-codec/MAL-2026-18432.json))
Text from the GitHub Advisory record.
Affected
pystr-codecPyPI
- No versions listed
Timeline
- Published
Related news
No article from the followed outlets names this vulnerability.