A short publication window can still reach build systems

Researchers examining the PyPI package agent-framework found malicious code in versions 1.26.1 and 1.26.2, published on 17 November. Those releases have since been removed. The analyzed wheels placed a .pth startup hook in Python's environment. That hook can execute when a Python interpreter starts after installation, even if application code never imports Agent Framework.

SafeDep and StepSecurity describe a credential stealer that searched local files and environment variables, including cloud and CI credential paths, and attempted to send findings to an attacker-controlled endpoint. Their wheel analysis does not establish how the malicious releases were published or how many environments ran the code. Package removal stops new installs of those files from the index; it does not clean an environment that already installed one.

Check the next interpreter start

Running a diagnostic Python command in a suspect environment could execute the startup hook again. Preserve and isolate the environment first, then inspect it from a trusted host or image.

Find installations, then scope the credentials

  1. 1

    Locate the two versions. Search dependency locks, package caches, container layers, virtual environments and CI install logs for agent-framework 1.26.1 or 1.26.2. Note which jobs launched Python after installation.

  2. 2

    Preserve evidence without executing the hook. Isolate affected runners and workstations, retain relevant wheels and logs, and investigate outbound connections from the affected period. Use a clean environment for inspection.

  3. 3

    Rebuild and review reachable secrets. Rebuild from a known-good package version and clean base image. Scope and rotate credentials that the payload could have read, including developer tokens, cloud identity material and CI secrets.

An install-only inventory misses the exposure window

The key question is whether Python started after the bad wheel landed. A paused CI job that downloaded a package and never launched an interpreter has a different exposure from a runner that immediately executed tests with access to deployment credentials. Tie package evidence to process and secret access before deciding the response scope.