# GHSA-F93H-MC69-274W: Malicious code in pystr-codec (PyPI)

- Database: GitHub
- Malicious package: yes
- Published: 2026-11-01
- Modified: 2026-11-12

## Affected versions

- pystr-codec (PyPI): 0.1.0
- pystr-codec (PyPI): 0.1.1
- pystr-codec (PyPI): 0.1.2

## Description

## Source: kam193 (9f8b8630f88afc0b4a1aedeefb4e20adbf3fb9dea06f64747fb0bdf65c0a7bc1)
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))

## References

- https://bad-packages.kam193.eu/pypi/package/pystr-codec
- https://github.com/ossf/malicious-packages/blob/819afc73054b00d0f063859694cf3b0ff1f52d53/osv/malicious/pypi/pystr-codec/MAL-2026-18432.json
- https://safedep.io/testmetest-npm-worm-miasma-variant
- https://github.com/ossf/malicious-packages/blob/b3c4693a646d0bed5f393f4787b8d01635f3d746/osv/malicious/pypi/pystr-codec/MAL-2026-18432.json
- https://pypi.org/project/pystr-codec/0.1.1
- https://pypi.org/project/pystr-codec/0.1.2
- https://github.com/advisories/GHSA-f93h-mc69-274w

Page: https://cve.now/GHSA-F93H-MC69-274W

Wrong or missing data? Send feedback: POST https://cve.now/api/v1/feedback (see https://cve.now/agents#feedback).
