pystr-codec has 3 compromised versions.

CriticalMalicious packagePyPI

pystr-codec has 3 versions on PyPI flagged in 1 incident we track. Only the exact versions listed below were named by the source advisories. pystr-codec was malicious from its first publish. There is no legitimate version to roll back to; remove it entirely.

At a glancePyPI
3
Compromised versionsDo not install these

If one is in your tree, treat the machine as compromised, not just out of date.

Ecosystem
PyPI
Worst severity
Critical
Incidents
1
First flagged
1 Nov 2026
Type
Malicious package

Version data comes from the public advisories cited on each incident page.

Affected versions

The exact releases to look for.

Check what you actually have installed with pip show pystr-codec.

  • pystr-codec@0.1.2
  • pystr-codec@0.1.1
  • pystr-codec@0.1.0
The incident

The incident that flagged it

CriticalMalicious package

pystr-codec PyPI package carries Miasma worm payload under testmetest alias

kam193 and OpenSSF flagged pystr-codec@0.1.0, 0.1.1, 0.1.2 on PyPI (GHSA-f93h-mc69-274w / MAL-2026-18432) as a Miasma-family worm variant - the first observed PyPI incarnation of the self-propagating credential-stealing worm previously seen on npm as the June 2026 @redhat-cloud-services / Leo Platform / testmetest campaigns. The package drops a malicious .pth file that runs on every Python startup, executes obfuscated JavaScript under a downloaded Bun runtime, exfiltrates credentials to a public GitHub repo via paleasbest.top, awaits remote commands, re-spreads using harvested credentials, and performs destructive actions on hosts whose credentials are later invalidated.

Versions named here: 0.1.0, 0.1.1, 0.1.2Read the incident →
What to do

Installed one of these? Start here.

Treat the machine as compromisedUpgrading is not enough. Packages in these incidents typically execute at install time, so the payload has already run with whatever credentials were in the environment.

  1. Rotate every credential that machine or CI job could reach, such as registry tokens, cloud keys, SSH keys and CI secrets, from a different machine.
  2. Pin to a version not listed above, then reinstall from a clean lockfile.
  3. Clear caches and private mirrors. Artifactory, Nexus, Verdaccio and devpi routinely keep serving a tarball after the public registry has pulled it.
  4. Read the incident write-up. Recommended actions differ per incident, and some have specific indicators of compromise worth searching your logs for.

Version data comes from the public advisories cited on each incident page. We list only versions those advisories name and do not infer additional ones. Think this is wrong or incomplete? Tell us.

Check your whole project

Check every dependency, not just this one.

It is usually pulled in as a transitive dependency rather than one you installed directly. Paste your requirements.txt to check every dependency at once. It runs in your browser and nothing is uploaded.