Case · DiggingBeagle record

pystr-codec PyPI malware uses Python startup hooks in an agent-tool supply-chain campaign

An advisory identifies malicious pystr-codec distributions that trigger payloads from Python startup hooks and reportedly modify coding-agent instruction and tool files.

Scope

Malicious payload capabilities are reported; real victim count, successful exfiltration and shared attribution with other worms remain unverified.

Assessment profile

Assessment method
Setting
research demonstration
Exploitation
not established
Evidence
Grade C
Remediation
mitigation available
AI role
AGAINST AI
Basis and provenance

The OpenSSF malware advisory documents hostile package code and versions; no installation population, confirmed external victim effects or common operator identity follows automatically from that listing. Impact remains unbanded because no calibrated impact rubric for this particular evidence is established.

Assessed Nov 2, 2026 using diggingbeagle.assessment/1.

At a glance

Mechanism and trust boundary

  1. 01

    Install hostile Python distribution

    The package places a startup hook in interpreter-visible paths.

    Boundary: Dependency installation into Python process startup

  2. 02

    Run secondary payload

    The hook launches an obfuscated Bun-stage routine intended to harvest credentials.

    Boundary: Python interpreter startup into arbitrary code

  3. 03

    Modify agent surfaces

    Reported payload logic targets tools or instruction files that future agent sessions may consume.

    Boundary: Compromised host into persistent agent workflow

Claims & evidence

CLM-2026-NOV02-PYSTR-CODEC-AGENT-WORM-AGHSA-f93h-mc69-274w identifies pystr-codec versions 0.1.0, 0.1.1 and 0.1.2 as malicious, with Python startup execution and a secondary JavaScript/Bun payload intended to harvest credentials and propagate.supported

Basis: reported finding

Link to claim

Implications

Developer package execution can become agent instruction persistence; package removal does not prove earlier credentials or workspace state are clean.

Controls and mitigations

  • Quarantine installed distributions, inspect .pth files and agent instruction/configuration diffs, rotate exposed credentials and audit external transfers.
  • Remove the hostile distribution and interpreter startup files, inspect agent instruction changes and rotate any credentials available to that interpreter environment.

Unknowns and contradictions

  • Malicious payload capabilities are reported; real victim count, successful exfiltration and shared attribution with other worms remain unverified.
  • There is no patched version in the advisory; installed population, transfer logs and confirmed common authorship with related worms are unknown.

Sources and citation

Material revision history

  1. Nov 2, 2026 · Canonical change recorded · new in release · revision 214