As reported by BleepingComputer, attackers compromised Microsoft's official Agent Framework PyPI package on November 17, 2026, publishing two malicious versions (1.26.1 and 1.26.2) that deployed a credential stealer via Python startup hooks. With roughly 200,000 monthly downloads, this is a significant supply chain incident — but the technical execution is what demands closer scrutiny.

Threat Alert: As reported by BleepingComputer, attackers compromised Microsoft's official Agent Framework PyPI package on November 17, 2026, publishing two malicious versions (1.26.1 and 1.26.2) that deployed a credential stealer via Python startup hooks.

Why This Attack Pattern Is Particularly Dangerous

The most alarming aspect of this compromise is not the credential theft itself — it's how the malware achieved execution. The attacker leveraged Python's .pth file mechanism, which automatically executes code during interpreter startup. This means the stealer ran even when the Agent Framework package was never explicitly imported by the victim's code. Any Python process started in an environment where the malicious package was installed — including unrelated scripts, CI runners, or even an interactive REPL — would trigger the payload.

This is a design feature of Python's site module being weaponized. The .pth files placed in site-packages are processed at startup, and any import statements within them execute automatically. Most developers assume a package only runs code when you import it. This attack breaks that mental model.

The attacker also retained the legitimate agent-framework-core 1.26.0 dependency, meaning the framework continued to function normally. There was no functional breakage to tip off developers that something was wrong — a hallmark of well-executed supply chain compromise.

Breadth of Credential Targeting

The stealer cast a wide net across the modern cloud development stack:

Why This Attack Pattern Is Particularly Dangerous
Cloud providers: Azure managed identity tokens, AWS credentials
DevOps platforms: GitHub Actions OIDC tokens, Azure DevOps OIDC tokens, Docker credentials
AI/ML services: OpenAI API keys, Hugging Face tokens
Local sources: Environment variables, local configuration files, other running processes

The targeting of OIDC tokens is especially concerning. Unlike static API keys, OIDC tokens are short-lived — but they can be exchanged for cloud resource access and can enable lateral movement into CI/CD pipelines, potentially allowing the attacker to push malicious commits or compromise additional build artifacts downstream.

Who Is Most at Risk

Any developer or CI/CD environment that installed agent-framework versions 1.26.1 or 1.26.2 between November 17, 2026 and the quarantine is potentially compromised. The highest-risk scenarios involve:

  • CI/CD runners with cloud provider roles attached — especially GitHub Actions runners with OIDC trust configurations
  • Developer workstations with cloud CLI tools authenticated (Azure CLI, AWS CLI, gcloud)
  • Container build environments where Docker credentials may have been cached
  • ML/AI development environments with Hugging Face and OpenAI credentials stored locally

Shield53 Recommendations

Immediate Actions

  • Identify affected systems: Search all development machines, CI runners, and containers for agent_framework_meta.pth, af_runtime_diag.pth, or files agent_framework_meta/_telemetry.py and af_runtime_diag.py in site-packages
  • Rotate ALL credentials that existed in any environment where the malicious versions were installed — assume compromise, not potential exposure. This includes: Azure managed identities, AWS access keys, GitHub tokens, Docker Hub credentials, OpenAI API keys, Hugging Face tokens, and any secrets in environment variables or config files
  • Review cloud audit logs for anomalous API calls, token exchanges, or resource access originating from attacker infrastructure (the webhook.site exfiltration endpoint is documented)
  • Revoke and reissue OIDC trust relationships in GitHub Actions and Azure DevOps if those runners were affected
  • Pin package versions using lockfiles (requirements.txt with hashes, Poetry with --lock, pip-tools) and verify checksums before installation

Longer-Term Hardening

  • Deploy dependency monitoring tools like Socket, Step Security, or Snyk that detect suspicious package behavior at install time
  • Use PyPI's hash verification and consider mirroring critical dependencies internally with reproducible builds
  • Implement least-privilege CI/CD tokens — the impact of this attack would have been dramatically reduced if OIDC tokens were scoped to specific repositories and actions rather than broad cloud roles
  • Audit your site-packages directories regularly for unexpected .pth files — this is an undermonitored attack surface

The fact that the attacker was able to publish a second malicious version 2.5 minutes after the first was quarantined suggests Microsoft's PyPI publishing credentials themselves may have been compromised — or that a maintainer token was leaked. Until Microsoft confirms the root cause, organizations should treat this as a potential ongoing access vector and monitor for further malicious publications under Microsoft's PyPI namespace.