Microsoft's agent-framework on PyPI shipped a credential stealer in two
Microsoft removed malicious agent-framework versions 1.26.1 and 1.26.2 from PyPI after a credential stealer targeted Azure and CI pipeline secrets on Nov 17.
By Dillip Chowdary • Nov 18, 2026 • Source: aikido.dev

At a glance
- Product
- Microsoft Agent Framework meta-package
- Compromised versions
- 1.26.1 and 1.26.2
- Safe release
- 1.26.0
- Incident date
- Nov 17, 2026
- Monthly downloads
- Approximately 190,000 downloads
- Exposure window
- 20:35 UTC to 21:20 UTC
In this post
Microsoft's meta-package for the Microsoft Agent Framework was compromised on PyPI on Nov 17, 2026, when an attacker published two malicious releases containing an embedded credential harvester. As detailed in aikido.dev's report, versions 1.26.1 and 1.26.2 appeared thirty-three minutes apart before security teams removed both files within forty-five minutes. The malicious updates targeted automated cloud infrastructure, stealing enterprise secrets during Python execution.
This report details the package compromise, the background execution mechanism, the specific cloud secrets harvested across memory, and the required remediation steps for development teams. The analysis is intended for platform administrators, security operations engineers, and developers managing automated CI pipelines or workstations running Python AI tooling. Teams with unpinned dependencies during the exposure window must identify affected environments and revoke exposed credentials immediately.
01Malicious wheel uploads across thirty-three minutes
The intrusion began at 20:35 UTC on Nov 17, 2026, when version 1.26.1 was uploaded to PyPI, mimicking the legitimate 1.26.0 release from five days earlier. The package retained identical documentation and dependency pins so automated tools treated the update as a routine patch. Thirty-three minutes later, the attacker published version 1.26.2 and removed 1.26.1, adding targets in GitHub Actions.
Package inspection revealed anomalies that separated both fraudulent releases from Microsoft's genuine pipeline. Genuine releases publish a source distribution and a compiled wheel forty seconds apart, but version 1.26.1 arrived only as a wheel. The internal metadata and injected files carried Nov 17 timestamps with world-writable permissions, while packaging headers kept older build stamps.
Security researchers examined the active wheel on the public index, enabling rapid registry intervention. By 21:20 UTC, PyPI administrators removed both fraudulent releases, restoring version 1.26.0 as the latest release. The public exposure window lasted approximately forty-five minutes across the registry index.
02Interpreter startup hijacking through path files
Python wheels cannot execute installation scripts directly, prompting the attacker to abuse native interpreter mechanisms to achieve execution. The rogue wheel injected a custom path configuration file named agent_framework_meta.pth into site-packages, while version 1.26.2 used af_runtime_diag.pth. Whenever Python initializes, the standard site module processes every path file and immediately evaluates any lines beginning with an import statement.
This mechanism enabled the payload to execute on every interpreter launch, regardless of whether application code imported the agent framework package. Running common tools like pytest or pip inside the environment triggered the injected telemetry hook immediately. The loader modified the package initialization file by appending a lightweight hook wrapped in an exception handler that silenced all errors.
To prevent performance degradation that might alert developers, the hook initialized an execution safeguard using a dedicated environment variable flag. On Linux and macOS systems, the script spawned a background child process via fork and detached session control using setsid before terminating the parent thread. On Windows systems lacking fork support, the payload executed inside a background daemon thread.
03Process memory scanning and credential exfiltration
Advertisement
Tech Pulse Daily
Get tomorrow's pulse first
Join engineers who read Tech Pulse before stand-up. Free, weekday mornings.
Once active in the background, the payload searched environment variables for sensitive substrings including TOKEN, SECRET, KEY, AZURE, AWS, GITHUB, and OPENAI. It expanded collection by inspecting process memory across the operating system, reading environment blocks from up to three hundred running processes via proc filesystem descriptors. This technique captured secrets held by parent build runners beyond the Python process itself.
The malware simultaneously traversed local storage systems to inspect up to sixty configuration files measuring under 256 kilobytes each. Target assets included Azure CLI state in user profiles, Docker authentication files, and credentials for package managers including pip, npm, and netrc. It also scanned application workspaces for dotenv files and configuration stores containing embedded API tokens.
All harvested credentials were assembled into structured payloads and transmitted over HTTPS to an external endpoint hosted on webhook.site. The attacker structured the exfiltration pipeline to run once per process hierarchy, ensuring continuous harvesting across dynamic container workloads without saturating local network interfaces. Network administrators can identify compromised systems by querying proxy and DNS logs for connections to that destination.
04Pipeline token harvesting in continuous integration
Automated continuous integration runners faced the most severe operational exposure because builds frequently pull packages without pinned version locks. Because the package averages roughly 190,000 monthly downloads, pipelines running fresh installations during the forty-five-minute window executed the harvester with runner privileges. On Azure DevOps, the script accessed system access tokens and service connections bound to the active deployment job.
When executing inside Azure DevOps, the payload attempted to generate federated cloud credentials by querying the internal OpenID Connect request URI. Pipelines using workload identity federation rely on short-lived tokens exchanged with Microsoft Entra ID rather than static service principal secrets. By capturing these tokens, the stealer obtained operational access to connected cloud resources under the permissions granted to the service principal.
The subsequent 1.26.2 release expanded this harvesting capability directly into GitHub Actions environments by targeting workloads configured with OpenID Connect write permissions. Workflows executing with id-token permissions allow jobs to authenticate seamlessly to cloud providers without hardcoded secrets. Compromised developer workstations and Azure virtual machines with attached managed identities remained similarly exposed if builds resolved the malicious patch versions.
05Remediation steps and credential rotation protocol
Organizations that resolved dependencies between 20:35 UTC and 21:20 UTC on Nov 17 must immediately audit environments and purge cached artifacts. Administrators must inspect Python site-packages directories for rogue path files, clear automated build caches, and enforce static dependency versioning across all deployment manifests.
- Verify installed packages Run pip show agent-framework and inspect site-packages for agent_framework_meta.pth or af_runtime_diag.pth files.
- Pin safe release Lock dependency manifests to agent-framework==1.26.0 and rebuild all container images and pipeline virtual environments.
- Rotate accessible credentials Invalidate Azure DevOps personal access tokens, service connection keys, Azure service principals, and GitHub or registry tokens.
- Audit identity logs Review Microsoft Entra ID sign-in records for unusual activity tied to service principals and workload identity federations.
- Inspect network traffic Query perimeter firewalls, proxy appliances, and DNS servers for outbound connection attempts directed toward webhook.site.
Note: Removing the compromised packages terminates future payload executions on Python interpreter launches, but local deletion does not retrieve or invalidate data already transmitted. Any credential accessible to a host during the active infection window must be treated as fully compromised and rotated immediately.
Frequently asked questions
Which agent-framework versions were compromised on PyPI?
Releases 1.26.1 and 1.26.2 of the Microsoft Agent Framework meta-package were compromised with an embedded credential stealer. Both versions were published on Nov 17, 2026, and removed within 45 minutes.
How does the malware execute without importing the package?
The package drops a custom path file into Python site-packages that executes an import statement whenever the Python interpreter starts. This triggers the background telemetry script even during unrelated tasks like running tests or package management.
What credentials does the agent-framework stealer target?
The stealer scans environment variables, process memory across 300 active processes, and up to 60 local configuration files for cloud keys. It extracts Azure credentials, GitHub Actions tokens, Docker configs, and Azure DevOps OpenID Connect tokens.
How can engineering teams fix affected environments?
Teams should pin dependencies to version 1.26.0, verify site-packages for malicious path files, and rebuild affected containers. Because exfiltrated credentials were sent to an external webhook, all accessible tokens and secrets must be rotated immediately.
Sources
Author
Dillip Chowdary
Writes Tech Bytes coverage of AI, engineering, and the tools that actually ship. Editor of Tech Pulse Daily.
Related on Tech Bytes
Advertisement