Threat

Microsoft’s Agent Framework PyPI package compromised to steal credentials

Page published · Page updated

Dossier

Earliest dated coverage: 18 Nov 2026 · First observed: 18 Nov 2026 · Latest dated coverage: 18 Nov 2026

Coverage timeline

18 Nov 2026bleepingcomputer.com

Single-source incident — one report is available.

Why it matters

The Agent Framework compromise puts AI development and CI environments at risk of cloud-account and pipeline compromise, with malicious code executing even when applications never import the infected package.

Attackers compromised Microsoft's official Agent Framework PyPI package, publishing malicious versions 1.26.1 and 1.26.2 that execute credential-stealing code during Python startup—even without importing the package. The payloads harvest secrets from development and CI environments, including cloud credentials and identity tokens, and exfiltrate them while preserving normal framework functionality.

campaign

Summary

BleepingComputer reports that Microsoft's official Agent Framework Python package on PyPI was compromised to distribute credential-stealing versions 1.26.1 and 1.26.2 on November 17, 2026. Both retained the legitimate agent-framework-core 1.26.0 dependency, allowing the framework to continue functioning while malicious code ran in the background. The supplied incident reporting consists of this single article; the security-firm analyses it references were not supplied as separate evidence.[0]

The principal execution risk was broader than explicit use of Agent Framework: malicious .pth files caused the stealer to run during normal Python startup in affected environments, even when the package was not imported. Collection targeted environment variables, configuration files, accessible processes, and cloud or CI identity tokens. The second release expanded collection to GitHub Actions OIDC token requests and GitHub runner directories.[0]

Both releases used the same exfiltration destination on webhook.site. PyPI quarantined the first release, but the attacker published the second roughly 2.5 minutes later; that release was quarantined about eight minutes afterward. Continued publication after the first quarantine demonstrated that the attacker still had publishing access at that point. How that access was initially obtained remained unresolved.[0]

The reported response priorities are to isolate environments that installed either malicious version, avoid running Python or pip until those environments are secured, rebuild from a known-clean environment using version 1.26.0, and rotate potentially exposed credentials. Egress evidence should be examined for the campaign-specific request path and evaluated for completed transfers rather than treating every attempted request as confirmed theft.[0]

Attack chain

  1. Malicious package distribution: The attacker published agent-framework 1.26.1 and 1.26.2 through Microsoft's official PyPI project. Both packages retained the legitimate agent-framework-core 1.26.0 dependency. The initial means of obtaining publishing access is unknown.[0]
  2. Execution during Python startup: In affected environments, normal Python startup executed the malicious code without an Agent Framework import. Version 1.26.1 used agent_framework_meta.pth and agent_framework_meta/_telemetry.py; version 1.26.2 used af_runtime_diag.pth and af_runtime_diag.py after restoring the original package initializer.[0]
  3. Credential and identity-token collection: The stealer harvested environment variables, local configuration files, and data from other processes where permissions allowed. It targeted credentials associated with Azure, AWS, GitHub, Docker, Hugging Face, OpenAI, and other services, and attempted to obtain Azure managed identity and Azure DevOps OIDC tokens. Version 1.26.2 additionally requested GitHub Actions OIDC tokens and searched GitHub runner directories.[0]
  4. Exfiltration: Both malicious releases sent collected data to the same attacker-used endpoint on webhook.site, with request path /d381fd80-ec62-42ad-8f5c-d1b15103c9bb. The article recommends using egress records to distinguish blocked requests from completed transfers when assessing an individual environment.[0]

Disclosure timeline

DateEvent
2026-11-17Malicious agent-framework version 1.26.1 was published on PyPI with a startup-triggered credential stealer.[0]
2026-11-17PyPI quarantined the first malicious release. Roughly 2.5 minutes later, the attacker published version 1.26.2 with revised payload packaging and additional GitHub Actions collection capabilities.[0]
2026-11-17PyPI quarantined version 1.26.2 approximately eight minutes after its publication.[0]
2026-11-18BleepingComputer published its report, referencing research by Socket, StepSecurity, and Ox Security. The article stated that the initial publishing-access compromise remained unexplained and that Microsoft had not responded by publication.[0]

How it works

The established mechanism is malicious package execution, not a disclosed software vulnerability. An attacker obtained the ability to publish releases under the official agent-framework PyPI project, but the article does not establish how that access was acquired.[0]

The payload used .pth-based execution during normal Python startup. In version 1.26.1, agent_framework_meta.pth invoked the credential stealer in agent_framework_meta/_telemetry.py. This made explicit import of Agent Framework unnecessary for execution in an affected environment.[0]

Version 1.26.2 changed the payload layout: the original package initializer was restored, while malicious code moved into af_runtime_diag.pth and af_runtime_diag.py. Both releases continued to depend on legitimate agent-framework-core 1.26.0, preserving normal framework operation while the stealer ran.[0]

Collection extended beyond static configuration secrets. The malware attempted to obtain Azure managed identity access tokens and Azure DevOps OIDC tokens, and the second release added GitHub Actions OIDC token requests and GitHub runner-directory searches. Access to other running processes was conditional on available permissions.[0]

Affected versions and patch status

ProductAffectedPatch status
Microsoft Agent Framework Python package: agent-framework on PyPIMalicious releases 1.26.1 and 1.26.2, both published November 17, 2026. The reported startup-execution behavior applies to environments containing these releases; both retained legitimate agent-framework-core 1.26.0 as a dependency.PyPI quarantined both malicious releases. The article identifies agent-framework 1.26.0 as the safe release and recommends rebuilding from a known-clean environment using that version.[0]

Indicators of Compromise

TypeIndicatorContext
domainwebhook.siteHost used by both malicious releases for exfiltration. Correlate with the campaign-specific request path; the domain alone does not identify the specific endpoint used in this incident.[0]
other/d381fd80-ec62-42ad-8f5c-d1b15103c9bbCampaign-specific exfiltration request path on webhook.site. Search egress records and distinguish blocked attempts from completed transfers.[0]
file-pathagent_framework_meta.pthPython startup execution artifact used by malicious agent-framework version 1.26.1. The article provides this filename, not an absolute installation path.[0]
file-pathagent_framework_meta/_telemetry.pyCredential-stealer module executed through agent_framework_meta.pth in version 1.26.1.[0]
file-pathaf_runtime_diag.pthStartup execution artifact used by malicious agent-framework version 1.26.2.[0]
file-pathaf_runtime_diag.pyMalicious Python module used with af_runtime_diag.pth in version 1.26.2.[0]

Key takeaways

  • Not importing Agent Framework did not prevent execution: the malicious releases used Python startup hooks, while retaining legitimate dependencies and normal framework functionality.[0]
  • Quarantining the first release did not immediately eliminate the attacker's ability to publish. The second malicious release appeared roughly 2.5 minutes later with changed payload packaging and expanded collection.[0]
  • Treat installed-version exposure and confirmed data transfer as separate findings. The article provides an endpoint for egress investigation, but its roughly 200,000 monthly-download figure is not a count of compromised installations.[0]
  • The initial compromise mechanism remains an intelligence gap. The evidence supports malicious use of official package-publishing access, not a particular stolen credential, release-pipeline weakness, or named threat actor.[0]

Defensive actions

  • Identify environments that installed agent-framework 1.26.1 or 1.26.2 and isolate affected environments.: These are the two reported malicious releases. Exposure assessment must account for normal Python startup, because execution did not require an Agent Framework import.[0]
  • Avoid running Python or pip inside affected environments until they have been secured.: The malicious .pth files execute the stealer during normal Python startup; this precaution is explicitly recommended in the report.[0]
  • Rebuild from a known-clean environment using agent-framework 1.26.0.: The article identifies 1.26.0 as the safe release and recommends rebuilding affected environments rather than continuing to use the compromised installation.[0]
  • Immediately rotate potentially exposed credentials that were accessible to the compromised environment.: The payload collected environment variables, local configuration secrets, and accessible process data, and attempted cloud and CI token acquisition. The potential exposure scope therefore extends beyond credentials used directly by Agent Framework.[0]
  • Search egress records for webhook.site requests containing /d381fd80-ec62-42ad-8f5c-d1b15103c9bb and determine whether transfers completed.: Both releases used the same endpoint. The article specifically recommends distinguishing blocked requests from completed transfers to assess the actual extent of compromise.[0]
  • Hunt for the reported startup and payload artifacts: agent_framework_meta.pth, agent_framework_meta/_telemetry.py, af_runtime_diag.pth, and af_runtime_diag.py.: These files distinguish the two documented payload layouts and provide concrete artifacts for investigating affected Python environments.[0]