# Microsoft Agent Framework's PyPI releases stole credentials at Python startup — check 1.26.1 and 1.26.2

Two November 17 releases of Microsoft's agent-framework Python package were poisoned with startup-triggered credential theft. Both are quarantined, but removing the package alone does not revoke potentially exposed Azure, GitHub Actions or other secrets.

Microsoft Agent Framework PyPI versions 1.26.1 and 1.26.2 contained .pth-triggered credential stealers. Operators need to check resolved dependencies, isolate affected environments and rotate reachable secrets.

- Status: Active
- Published: 2026-11-19T06:12:53+13:00
- Updated: 2026-11-19T06:12:53+13:00
- Categories: Artificial Intelligence, Web Development, AI Agents, AI Coding, Developer Tools
- Tags: AI agents, Microsoft, security, supply chain security
- Canonical HTML: https://beyondthe.news/dossiers/microsoft-agent-framework-pypi-1261-1262-credential-stealer-november-2026

## What changed

On November 17, 2026, attackers published malicious versions 1.26.1 and 1.26.2 of Microsoft's official agent-framework distribution on PyPI. Socket's artifact analysis identified Python .pth startup hooks that ran credential-collection code when Python started, even without importing the package. The second malicious release changed the hook and added GitHub Actions OIDC collection. Both releases were quarantined; reporting identifies 1.26.0 as the last known clean release at the time of investigation. A Microsoft maintainer acknowledged the compromise and investigation, but the initial publisher-account intrusion mechanism remains unconfirmed.

## Why it matters

A routine dependency install could expose cloud, CI/CD and AI-provider credentials from developer machines or build agents without breaking the legitimate application. Startup hooks mean import-based checks and successful smoke tests cannot rule out compromise. Replacing the wheel is necessary but not sufficient: tokens already exfiltrated may remain valid until revoked.

## What the compromised releases did

Socket analysed the two PyPI wheels and documented different .pth startup paths: 1.26.1 used agent_framework_meta.pth and a telemetry-named collector, while 1.26.2 used af_runtime_diag.pth and af_runtime_diag.py. The collector inspected environment variables, configuration files and accessible process environments, and attempted to obtain Azure managed identity, Azure DevOps and, in 1.26.2, GitHub Actions OIDC credentials. It sent compressed, encoded data to a webhook.site destination. This is researcher-observed malicious functionality, not proof that every installation successfully exfiltrated data.

## Affected scope and immediate response

Check lockfiles, installed distributions, build logs, container layers and CI caches for agent-framework 1.26.1 or 1.26.2. Treat environments that executed Python with either installed version as potentially compromised, including environments that never imported the framework. Isolate them, preserve relevant logs and artefacts for investigation, rebuild from known-clean images and pin to a verified clean release such as 1.26.0 pending Microsoft guidance. Rotate and revoke reachable API keys, cloud tokens, deployment credentials and CI federation trust where exposure is plausible. Examine outbound egress records for the reported webhook.site indicator; absence of a successful request is not a guarantee that no credentials were exposed.

## What is confirmed and what is not

Socket's direct package analysis and separate security reporting agree on the affected versions, startup execution and credential targets. SecurityWeek reports that a Microsoft maintainer acknowledged removal and an ongoing investigation. The exact mechanism by which the attacker obtained publishing access, total download/install count of malicious wheels, successful exfiltration volume and victim impact have not been established. Do not confuse the approximately 190,000–200,000 monthly project downloads reported by news outlets with compromised installations.

## Why this differs from a normal package vulnerability

This was malicious code introduced into official distribution artefacts, not merely a bug in the framework's normal functions. The .pth mechanism runs through Python site initialization, which can affect unrelated Python processes in the same environment. Version 1.26.2 moved the payload, so a detector that only checks the 1.26.1 filename can miss the second release. Supply-chain controls should include package provenance, hash/lock verification, constrained build identities, outbound network controls and short-lived scoped secrets.

## Key details

- Affected PyPI distribution: agent-framework, versions 1.26.1 and 1.26.2, released November 17, 2026.
- Both releases quarantined; 1.26.0 reported as latest clean version at the time of research.
- Malware executes via .pth Python startup processing without requiring an explicit agent-framework import.
- Targets include environment variables, Azure identities, Azure DevOps and GitHub Actions OIDC tokens, and local credentials for other services.
- Researchers published wheel hashes and a webhook.site network indicator; check direct primary report for exact IOCs.

## Builder takeaways

- Inventory pinned and transitive agent-framework versions across workstations, CI and deployed images; identify whether Python ran after installation.
- Isolate and rebuild affected environments from trusted artefacts, then revoke or rotate secrets potentially reachable from those environments.
- Review egress, cloud audit and CI token-use logs; do not assume quarantining a package undoes credential exposure.
- Keep a verified-clean version pinned while awaiting authoritative Microsoft incident updates and publishing-access root cause.

## What to watch

- Microsoft's authoritative incident postmortem and account/publishing compromise mechanism.
- Any further malicious versions, additional exfiltration destinations or corrected affected-version scope.
- Evidence of successful credential abuse and guidance on revoking federated CI identities.

## Uncertainties

- Initial compromise vector for the PyPI publishing identity is not publicly established.
- No verified victim count or successful exfiltration total.
- Some environment-specific token acquisition attempts may fail; researchers demonstrated attempted collection rather than universal success.

## Sources

- [Microsoft's agent-framework PyPI package compromised with credential stealer](https://socket.dev/blog/agent-framework-pypi-package-compromised-with-credential-stealer) — Socket Research Team · primary · 2026-11-17T00:00:00+13:00. Direct analysis of malicious distributions, execution paths, indicators and targeted secrets.
- [Microsoft's Agent Framework PyPI package compromised to steal credentials](https://www.bleepingcomputer.com/news/security/microsofts-agent-framework-pypi-package-compromised-to-steal-credentials/) — BleepingComputer · independent · 2026-11-18T00:00:00+13:00. Independent incident reporting and operator remediation.
- [Microsoft Agent Framework Releases Poisoned With Credential Stealer](https://www.securityweek.com/microsoft-agent-framework-releases-poisoned-with-credential-stealer/) — SecurityWeek · independent · 2026-11-18T00:00:00+13:00. Independent corroboration and Microsoft maintainer acknowledgement.

