Opens in a new tab

Agent-Framework Compromise Steals Cloud Secrets

Malicious PyPI release of Microsoft agent-framework stole Azure and GitHub credentials

The agent-framework compromise exposed Azure, GitHub and CI/CD credentials through two malicious PyPI releases. Any Python environment that installed version 1.26.1 or 1.26.2 should be treated as potentially exposed.

The releases appeared under the legitimate Microsoft-associated agent-framework project on 17 November 2026. They were removed that evening, but installed copies may remain on workstations, servers, build runners, package caches and internal mirrors.

How the agent-framework compromise unfolded

The first malicious release, agent-framework 1.26.1, was uploaded to the Python Package Index at 20:35 UTC on 17 November 2026. Version 1.26.2 followed at 21:08 UTC, effectively re-arming the attack with a modified implementation after the earlier release was removed.

By approximately 21:30 UTC, both versions were no longer available from PyPI. A public status update at 21:35 UTC confirmed that the two releases were malicious and that version 1.26.0 had been restored as the latest known clean version.

The incident was first raised publicly through an issue in Microsoft’s agent-framework GitHub repository on 17 November. On 18 November 2026, the GitHub Advisory Database published GHSA-764m-3ppc-5m73, confirming the affected versions, Python startup technique and data exfiltration destination.

PyPI now marks versions 1.26.1 and 1.26.2 as quarantined. Version 1.26.0, released on 12 November 2026, remains the latest known clean release, with earlier versions also considered unaffected by current reports.

The agent-framework compromise did not involve a similarly named imitation package. The malicious files were distributed through the established Microsoft-associated project, increasing the chance that automated dependency updates or ordinary installation commands would trust them.

Signs of an abnormal release process

Version 1.26.1 was distributed only as a pre-built wheel, without the source archive normally published alongside it. There was also no matching agent-framework-core release or corresponding python-1.26.1 tag in Microsoft’s GitHub repository.

Version 1.26.2 showed similar packaging anomalies. These differences indicate that the uploads may have bypassed the project’s usual build and release process, but the precise entry point remains unconfirmed. A compromised PyPI upload credential or publisher account is considered possible, although no root cause or threat actor has been established.

How the agent-framework PyPI malware executed

The agent-framework compromise exploited Python’s processing of .pth files inside the site-packages directory. Python reads these files when the interpreter starts, and specially formed lines can import and execute code automatically.

Consequently, the credential stealer could run when any Python program started in the affected environment. An application did not need to import agent-framework, which significantly widened the execution opportunity on developer systems and automated build infrastructure.

Version 1.26.1 installed agent_framework_meta.pth. This imported agent_framework_meta, whose initializer called the malicious _telemetry helper. The associated payload was stored in agent_framework_meta/_telemetry.py.

Version 1.26.2 restored the package’s original initializer, making a basic comparison appear cleaner. It moved the payload to af_runtime_diag.py and activated it through af_runtime_diag.pth. An investigation that searches only for the first release’s filenames could therefore overlook the second.

The payload used the _AF_TEL environment marker as a run-once guard to prevent repeated execution in child processes. On POSIX systems it created a detached child process, while on Windows it used a daemon thread. Both approaches allowed collection to continue in the background without noticeably delaying the Python process that triggered it.

Credentials targeted by the agent-framework compromise

The malware searched environment variables for terms associated with credentials, including TOKEN, SECRET, PASSWORD, KEY, AZURE, AWS, GITHUB, OPENAI, NPM and PIP. It also inspected up to hundreds of readable process environment records under /proc and searched common application locations such as /app and /workspace.

Local files and configuration targeted by the stealer included:

  • Azure CLI data and Azure DevOps agent credential files.
  • Git credential stores, .git-credentials and .netrc files.
  • Docker config.json, npm .npmrc and Python pip.conf files.
  • Application .env files and Hugging Face access tokens.
  • Secrets available to developer workstations, servers and CI/CD runners.

The malware did not rely solely on credentials already stored on disk. Where suitable environment variables and platform services were available, it attempted to request fresh cloud and pipeline tokens.

Both versions could use SYSTEM_OIDCREQUESTURI and SYSTEM_ACCESSTOKEN to request Azure DevOps OpenID Connect tokens. They also contacted the Azure instance metadata service at 169.254.169.254 or an App Service IDENTITY_ENDPOINT to obtain Managed Identity tokens for several Azure resources.

Version 1.26.2 expanded the agent-framework compromise to GitHub Actions OIDC tokens. When a workflow had id-token write permission, the malware used ACTIONS_ID_TOKEN_REQUEST_URL and ACTIONS_ID_TOKEN_REQUEST_TOKEN to request tokens for Azure-related audiences, including api://AzureADTokenExchange and https://management.azure.com.

If Microsoft Entra ID trusted the affected workflow, a stolen OIDC token could potentially be exchanged for Azure access within that federated identity’s assigned permissions. The practical impact therefore depends on which secrets, identities and cloud roles were accessible from each compromised environment.

Exfiltration and current exploitation evidence

Collected information was assembled into JSON, compressed with zlib, base64 encoded and sent in a single HTTP POST to a hardcoded webhook.site address. The endpoint token was d381fd80-ec62-42ad-8f5c-d1b15103c9bb, sometimes followed by the telemetry query parameter.

Version 1.26.1 used the User-Agent value af-runtime-diagnostics/1, while 1.26.2 used runtime-diagnostics/1. Researchers reported that the free webhook service captured no more than 50 requests. This is an upper bound on received posts, not a count of victims, installations or stolen identities.

The agent-framework compromise is confirmed malicious activity rather than a theoretical vulnerability. However, the number of affected organisations remains unknown. Previously downloaded wheels can still be installed from local caches or internal mirrors even though PyPI has quarantined the releases.

Response steps for affected organisations

Organisations should identify whether agent-framework 1.26.1 or 1.26.2 was installed on any developer machine, server, Azure DevOps agent or GitHub Actions runner. Avoid starting Python in a suspected environment because interpreter startup can activate the payload.

  • Isolate affected hosts and rebuild them from a known-good image pinned to version 1.26.0.
  • Remove malicious wheels from package caches, build artefacts and internal mirrors.
  • Search for agent_framework_meta.pth, af_runtime_diag.pth, _telemetry.py, af_runtime_diag.py and the _AF_TEL marker.
  • Check proxy and network logs for the webhook.site token and the two recorded User-Agent values.
  • Rotate exposed Azure, GitHub, Azure DevOps, registry and application credentials.
  • Review Entra ID sign-ins, token exchanges, federated credentials and pipeline audit logs for unexpected activity.

Removal of the package alone does not revoke stolen tokens or repair a compromised runner. Environments affected by the agent-framework compromise should be treated as exposed until rebuilt, credentials are rotated and associated cloud activity has been reviewed.

Originally reported by cybersecuritynews.com.

Share this bulletin

About the Author

Headshot of Jonny Pelter, leading cyber security expert in the UK and CISO

Jonny Pelter

Partner

  • CIPM
  • CIPP/E
  • CISSP
  • CISM
  • CRISC
  • ISO27001
  • Prince2
  • MSc
  • BSc

Jonny Pelter

Jonny is a Founding Partner at CyPro and executive group level CISO who has worked closely with the British intelligence agencies NCSC and GCHQ.

An ex-professional rugby player and originating from KPMG and Deloitte, Jonny has a wealth of experience across numerous sectors including technology, critical national infrastructure, financial services, oil & gas, insurance, betting, pharmaceuticals and utilities.

Jonny is a leading cyber security expert in the UK, having featured on national media for his professional commentary such as BBC News, iPlayer, Telegraph and Times Radio.

View Profile
Back to Bulletins

Related CyPro Services

  • Managed Detection and Response (MDR)

    Managed Detection and Response (MDR) is an end-to-end managed service designed to help organisations detect, analyse and respond to cyber threats quickly and effectively. It...
    View Service
CyPro Cookie Consent

Hmmm cookies...

Our delicious cookies make your experience smooth and secure.

Privacy PolicyOkay, got it!

We use cookies to enhance your experience, analyse site traffic, and for marketing purposes. For more information on how we handle your personal data, please see our Privacy Policy.

Schedule a Call