Attackers published two malicious releases of Microsoft’s agent-framework package on PyPI, Python’s package registry. Versions 1.26.1 and 1.26.2, uploaded November 17, contain credential-stealing code that runs during Python startup in affected environments. An application need never import Agent Framework to trigger it.

Contain before starting Python or pip in an affected environment. Even an ordinary package-inspection or uninstall command can start the interpreter and run its installed hook again.

The package worked while the collector ran

Rohan Prabhu’s full StepSecurity analysis describes static inspection of both malicious wheels, Python’s packaged distribution files. OX Security’s November 17 investigation corroborates the credential-stealing mechanism. Both companies sell software-supply-chain security products.

The compromised umbrella package kept its dependency on legitimate agent-framework-core 1.26.0. Normal framework behavior could therefore continue alongside the malicious collector. This evidence identifies two umbrella-package releases; it does not establish that every related component was poisoned.

The startup files differed:

  • 1.26.1: agent_framework_meta.pth and agent_framework_meta/_telemetry.py.
  • 1.26.2: af_runtime_diag.pth and af_runtime_diag.py.

Python documents that executable startup-file lines run without an application importing their module. Exposure depends on which installed-package directories the interpreter processes. It does not automatically spread to every virtual environment on the machine.

StepSecurity reports that PyPI quarantined both releases. The second arrived after the first quarantine, demonstrating continued publishing access at that point. The reviewed reporting leaves the initial access route unresolved.

Evidence status: malicious releases documented through researcher analysis and corroborating reporting. The code attempts credential collection and transmission; these sources provide no verified count of victims or successful cloud-account takeovers.

Readable secrets and obtainable tokens both matter

The collector targets environment variables, credential files and other processes’ environments where operating-system permissions permit access. Its targets include cloud services, GitHub, Docker, package registries and model-service accounts.

It also attempts to request workload identity tokens, temporary credentials issued to running jobs or cloud workloads. Version 1.26.2 adds GitHub Actions identity-token requests. Success depends on job permissions, reachable identity endpoints and configured trust relationships. A request in the code is not proof that a usable cloud token was issued.

StepSecurity identifies the outbound destination as webhook[.]site, path /d381fd80-ec62-42ad-8f5c-d1b15103c9bb. Investigators should distinguish blocked attempts from completed transfers. A connection to that shared domain alone is insufficient evidence of this incident.

Recover from a clean environment

The source-supported response is broader than downgrading:

  • Isolate affected hosts, containers and build runners first. Preserve installation and network records using trusted tooling that does not start the affected interpreter.
  • Rebuild from a known-clean base. StepSecurity identifies 1.26.0 as the last clean release; PyPI’s current project page also presents that version. Remove malicious cached artifacts from the release path and rebuild affected images.
  • Replace potentially exposed credentials from a clean system. Scope this to secrets the collector could read or request. Treat exposure as a containment assumption until investigated.
  • Review workload identities and resource-access logs. Rotating a static secret does not necessarily invalidate an already-issued access token. Restrict compromised trust paths and investigate token use separately.
  • Account for collectors already running. StepSecurity describes a detached process on systems supporting it. Removing a startup file alone does not stop that process.

The morning digest mentioned these releases. This standalone incident note adds containment order and the distinction between stored secrets and workload identities.

Caveat: Microsoft had not supplied BleepingComputer with an initial-access explanation at publication. Download totals measure package use, not confirmed compromise.