Skip to content
RESEARCH INDEX BREACHROAD / INTELLIGENCE NOTE

Microsoft Agent Framework PyPI releases stole cloud and CI secrets

Versions 1.26.1 and 1.26.2 of agent-framework contained a .pth-triggered credential stealer. We analyse IOCs, blast radius and response.

PUBLIC RESEARCH
AUTHOR
/ CEO Breachroad · OSCP · PNPT
PUBLISHED
24 November 2026
READING TIME
20 min read
TOPIC
Supply Chain Security
Microsoft Agent Framework PyPI releases stole cloud and CI secrets

Two versions of the agent-framework metapackage published in the project’s legitimate PyPI namespace contained credential-stealing code. Malicious releases 1.26.1 and 1.26.2 appeared on 17 November 2026, were removed from the public registry, and the release history now presents 1.26.0 as the latest available clean version.

This is not a conventional vulnerability fixed by upgrading to the newest version. GitHub Advisory Database identifies both later releases as malicious and lists no patched version. Any organisation that downloaded either one should assume code execution on the host and exposure of secrets available to the Python process — even when the application never imported Agent Framework.

Confirmed timeline

Public artefacts establish a short but important exposure window:

  1. 17 November, 20:35 UTC — the agent-framework 1.26.1 wheel was published to PyPI.
  2. It contained a .pth startup hook that loaded a credential-stealing module when Python started.
  3. 17 November, 21:08 UTC — version 1.26.2 appeared with a renamed hook and additional targets, including GitHub Actions OIDC tokens.
  4. Both releases were removed from PyPI.
  5. On 18 November, GitHub Advisory Database published GHSA-764m-3ppc-5m73.
  6. On 23 November, the record was updated with both versions and further technical details.

No campaign attribution has been published. A malicious wheel appearing in the real project’s namespace does not reveal whether a PyPI token, a human account, the release pipeline or another mechanism was compromised. A public issue in the repository says the payload was absent from source and appears to have been uploaded outside the normal build, but a complete root cause has not been announced.

Why the payload ran without an import

The key technical detail is the .pth mechanism. Python processes these files from site-packages during environment initialisation. The malicious release used a line that imported a helper module, so the payload ran when the interpreter started rather than waiting for application code to execute import agent_framework.

That changes incident scoping:

  • searching for library imports in source code is insufficient;
  • any process started in an environment containing the wheel may be affected;
  • installing it into a CI image can trigger the payload in later job steps;
  • a shared virtual environment can expose multiple tools;
  • package caches and internal mirrors may retain an artefact removed from public PyPI.

Version 1.26.1 used agent_framework_meta.pth. Version 1.26.2 renamed the hook and module, defeating detection tied to one filename. Controls should cover resolved version, wheel hash, unexpected .pth files and network behaviour.

What the stealer targeted

The GitHub Advisory and OpenSSF record describe a broad collection set:

  • environment variables whose names refer to tokens, secrets, passwords, keys, Azure, AWS, GitHub and OpenAI;
  • credential files for Azure CLI, Docker, npm, Git and Hugging Face;
  • other processes’ accessible environment data through /proc;
  • tokens from Azure Instance Metadata Service and the App Service managed-identity endpoint;
  • Azure DevOps credentials present in the pipeline;
  • GitHub Actions OIDC tokens and runner temporary files in version 1.26.2.

Collected data was compressed and encoded, then sent in an HTTP POST to an endpoint hosted on webhook.site. That domain is a legitimate testing service, so its presence alone is not proof of infection. A Python process contacting it shortly after installing one of the affected versions is, however, a strong contextual signal.

IOCs: versions and hashes

ArtefactSHA-256 from GitHub Advisory
agent-framework 1.26.1 wheeld27fa34414e6201d5e03e559ef634f020057554d7b3f4898dd5d7cd3e989e110
agent-framework 1.26.2 wheel3d20a8bc91351a9a16b6db243b848ceca0206b7a8623b02d2af553a9c9f7e0a9

Use IOCs with context. Absence of either wheel hash on a live host does not exclude installation because the archive may have been deleted after extraction. Conversely, a wheel in an isolated artefact repository proves supply-chain exposure but not payload execution.

Determining whether the package reached your estate

Check dependency records

Search lockfiles, SBOMs, build history and resolver logs for exact versions 1.26.1 and 1.26.2. Include pip, uv, Poetry, container images and notebooks. A metapackage can arrive indirectly or through a base image.

Check artefact distribution

Review runner caches, PyPI proxies, private registries and stored wheels. Removing a version from public PyPI does not remove it from Artifactory, Nexus, a pip cache or an existing container image.

Check hosts and images

Look for distribution metadata with either affected version, unexpected .pth files and the modules named in the advisory. Compare images against the last known-good build. Do not start a suspicious environment solely to query its version; launching Python can reactivate the hook.

Check network and cloud logs

Correlate installation with webhook.site traffic, unusual metadata-service reads, OIDC token issuance, service-principal sign-ins and Key Vault operations. Prioritise secrets made available to pipelines that produce production artefacts.

Incident response in the right order

1. Isolate while preserving evidence

Disconnect the runner or host from production paths, pause publishing and retain snapshots, logs and caches. Do not begin with broad cleanup that destroys timestamps and files needed for scoping.

2. Establish the execution window

Identify the installation time and every Python start that followed it. Because the hook executes during interpreter initialisation, the possible execution list is broader than runs of an application that imports Agent Framework.

3. Inventory reachable secrets

Record environment variables, mounted files, workload-identity tokens, managed-identity permissions and other process data readable by the same user. Scope reachability, not merely secrets referenced in source code.

4. Rotate highest-impact access first

Revoke federated tokens and credentials capable of publishing new artefacts, administering cloud resources or reading vaults. Continue with service, registry, repository and AI model keys. Resetting one human password is insufficient if an application credential escaped.

5. Rebuild the environment

Recreate runners and images from trusted inputs. Uninstalling the package does not establish that stolen tokens were never used or that no follow-on changes remain.

6. Validate release integrity

Compare artefacts with reproducible builds, require hashes and provenance, and separate package publishing from ordinary developer identities. Monitor unexpected registry releases through an independent channel.

Is pinning 1.26.0 sufficient?

Pinning the clean 1.26.0 release prevents the two known malicious versions from being resolved again, but does not close an incident on hosts that already ran them. PyPI currently lists 1.26.0 and publishes SHA-256 14267ec8e6929c139015f8ec918adc638a71c7656901413426bb30ab199b6d71 for its wheel.

Teams should also:

  • deny versions 1.26.1 and 1.26.2 in proxies and dependency policies;
  • clear caches only after preserving evidence;
  • enforce lockfiles and hash checking;
  • rebuild images containing either malicious release;
  • verify that internal mirrors do not continue promoting removed versions;
  • rotate every credential reachable during possible execution.

Lessons for AI pipeline security

An agent framework naturally operates close to model keys, cloud identities, repositories and tools. Compromising its package can therefore have a wider blast radius than compromising a typical UI dependency. AI dependencies should be treated as privileged code.

A minimum standard includes:

  • lockfile installation with verified hashes;
  • isolated, ephemeral release runners;
  • no standing secrets in environment variables when federation is available;
  • short-lived tokens with restricted audience and scope;
  • build jobs denied metadata-service access by default;
  • egress allowlists for installation and test stages;
  • wheel inspection before execution, including .pth files;
  • an SBOM linked to each produced artefact;
  • two-person approval for public registry publishing;
  • independent monitoring for unexpected package releases.

Our software supply-chain attack guide and Vault, KMS and CI/CD secrets guide provide the broader control model.

Source facts and Breachroad conclusions

Confirmed by GitHub Advisory and OpenSSF: malicious versions 1.26.1 and 1.26.2, .pth execution, collection targets, exfiltration endpoint, wheel hashes and removal from PyPI.

Confirmed by PyPI: the current history lists 1.26.0 as the latest available release with a published hash; its artefact does not show provenance metadata.

Not publicly confirmed: how publishing was compromised, the number of malicious downloads, the number of environments that successfully exfiltrated data, the attacker and follow-on credential use.

Breachroad conclusion: every environment that started Python after installing either malicious version requires full secret scoping and rebuild. This is a cautious recommendation based on the .pth mechanism, not a claim that exfiltration succeeded in every case.

Sources

What to do now

Find agent-framework 1.26.1 and 1.26.2 across lockfiles, SBOMs, images and caches. If either was installed, isolate the environment, preserve evidence, inventory reachable credentials, rotate them and rebuild the runner or host from a known-good source.

Rehearse supply-chain decisions through secure-AI and cybersecurity training. Then validate pipeline identities, workload boundaries and tool access through AI red teaming and a DevSecOps review.

SHARE / COPY