SecureCyberVM
Daily Threat Briefing Exploited CVEs Ransomware Zero-day
SecureCyberVM
Get the Patch Brief
Home » Malware » Microsoft Agent Framework PyPI Package Hijacked to Steal Cloud and CI Credentials
Malware High

Microsoft Agent Framework PyPI Package Hijacked to Steal Cloud and CI Credentials

Two malicious releases of Microsoft's agent-framework Python package briefly appeared on PyPI with a startup-hook credential stealer targeting cloud, CI/CD and AI service secrets.

Microsoft Agent Framework PyPI Package Hijacked to Steal Cloud and CI Credentials

Two malicious releases of Microsoft’s official Agent Framework package for Python were published to the Python Package Index (PyPI) on November 17, 2026, carrying a credential stealer aimed at cloud, CI/CD and AI service secrets, according to research from Socket, StepSecurity and OX Security. The package, agent-framework, sees roughly 200,000 downloads per month, BleepingComputer reported.

Versions 1.26.1 and 1.26.2 were quarantined by PyPI within minutes of each other, but any environment that installed them during that window should be treated as compromised. How the attacker obtained the ability to publish under Microsoft’s project has not been disclosed, and Microsoft had not responded to BleepingComputer’s questions at the time of its report.

What happened

According to a UTC timeline published by StepSecurity, version 1.26.1 was uploaded at 20:35 on November 17 and quarantined at 21:06. Version 1.26.2 followed about two and a half minutes after that quarantine and was itself quarantined roughly eight minutes later. BleepingComputer noted that the second upload indicates the attacker still held publishing access after the first release was pulled. The last clean release, 1.26.0, was published on November 12, StepSecurity said.

Both malicious releases kept their dependency on the legitimate agent-framework-core 1.26.0, so the framework continued to work normally, which OX Security said makes the compromise easy to miss. StepSecurity observed that both uploads lacked provenance attestation and used an unusual uploader client. Its report also references a maintainer account added to the project, but the firm states that the initial access vector and uploader identity are not established.

Who is affected

Any developer workstation, build agent, container image or CI/CD runner that installed agent-framework 1.26.1 or 1.26.2 is affected. Because the payload runs at Python interpreter startup through a .pth file, it executes even if the Agent Framework is never imported, according to Socket and StepSecurity. Environments that pinned 1.26.0 or earlier with hash-verified lockfiles were not exposed to these releases.

Severity and exploitation

The researchers describe a broad, one-shot collection of secrets. According to Socket and StepSecurity, the stealer gathers credential-related environment variables, the environments of other running processes, and configuration files for Azure CLI, Azure DevOps agents, pip, npm, netrc, git, Docker, Hugging Face and application .env files. It also requests Azure managed identity tokens and Azure DevOps OIDC tokens, and version 1.26.2 adds GitHub Actions OIDC tokens and searches GitHub runner directories. The data is compressed and sent to a single webhook.site endpoint.

Socket and StepSecurity both said the payload does not download further code, and StepSecurity found no persistence through scheduled tasks or services. The damage therefore lies mainly in what was stolen: cloud and pipeline credentials that can be used long after the package itself is removed. No public reporting so far describes follow-on use of stolen credentials.

Published indicators include the files agent_framework_meta.pth and agent_framework_meta/_telemetry.py (1.26.1), af_runtime_diag.pth and af_runtime_diag.py (1.26.2), the exfiltration URL webhook[.]site/d381fd80-ec62-42ad-8f5c-d1b15103c9bb, and the HTTP User-Agent strings runtime-diagnostics/1 and af-runtime-diagnostics/1. Socket and StepSecurity list file hashes for both wheels.

What defenders should do now

  1. Search lockfiles, package caches, internal mirrors, container images and CI logs for agent-framework 1.26.1 or 1.26.2, and block both versions in package proxies.
  2. Isolate affected hosts and runners before running Python or pip on them; StepSecurity warns that routine pip commands can re-trigger the startup hook.
  3. Rebuild affected systems from a known-clean base and pin agent-framework==1.26.0 with hash-checked lockfiles.
  4. From a clean system, rotate every secret reachable from an affected environment, including Azure service principal secrets, personal access tokens, and GitHub, npm, PyPI, Docker, Hugging Face and OpenAI tokens.
  5. Review Azure sign-in and activity logs for managed identity and federated credential use, and audit GitHub OIDC trust, Azure DevOps service connections and managed identity role assignments. Revoking trust does not invalidate tokens already issued.
  6. Search egress and proxy logs for the webhook path and User-Agent strings above, distinguishing blocked requests from completed transfers, and consider blocking webhook.site from build infrastructure.

SCVM analysis

This incident targets the AI developer toolchain directly, and its credential list reflects that: model provider keys and Hugging Face tokens sit alongside cloud and CI secrets. The quick PyPI quarantine limited the exposure window to well under an hour, but automated pipelines that resolve unpinned dependencies can install a package many times in that span. The absence of provenance attestation on both malicious uploads is a practical control point; organizations that verify Trusted Publishing attestations for critical vendor packages would have had a signal to reject these releases. Until Microsoft explains how publishing access was obtained, teams should treat any future unexpected agent-framework release with caution.

Sources

About this article: produced by the SCVM Newsroom with AI assistance from the public sources linked above, enriched with NVD, FIRST EPSS and CISA KEV data, and checked by automated quality controls under our editorial policy. Spotted an error? Request a correction.