Can a compromised dependency steal my GitHub Actions OIDC token? What id-token: write exposes, and what the agent-framework PyPI compromise took
Yes, if the job has id-token: write. On November 17, 2026, malicious agent-framework versions 1.26.1 and 1.26.2 were published to PyPI. Both ran a stealer every time Python started. Version 1.26.2 also asked GitHub Actions for OIDC tokens meant for Azure. Both versions have been removed, and 1.26.0 is the last clean release. No source cited here says this incident published a malicious release or swapped a GitHub release. The lesson is about how much a single install step can reach.
What was published, and what was clean
GitHub's advisory GHSA-764m-3ppc-5m73 (critical, published November 18, 2026) covers malicious releases of the real agent-framework package, the Microsoft Agent Framework. It lists exactly two affected versions, 1.26.1 and 1.26.2, and no patched version. Version 1.26.0 and earlier are not affected.
- 1.26.1 was published at 20:35 UTC on November 17, as a wheel only (no source distribution), according to the advisory.
- 1.26.2 was published at 21:08 UTC, according to the advisory and Wiz. That is 33 minutes after 1.26.1.
- Removal: the advisory says both have since been removed from PyPI. Endor Labs, writing as it happened, said 1.26.1 was gone by 21:13 UTC and 1.26.2 was then the latest release, still live at 21:16 UTC. Wiz says both were gone as of 21:30 UTC. These are readings taken at different times, not a disagreement.
- Attribution: the advisory says, "We have not attributed this to a known campaign."
According to Endor Labs, only the agent-framework meta-package was touched. The 22 sibling agent-framework-* packages it checked, including agent-framework-core, still had November 12 as their latest release. Endor also notes that every release it examined from 1.21.0 through 1.26.0 had both a wheel and a source distribution, and neither malicious version had a source distribution.
Why a dependency can ask for an OIDC token
Each malicious wheel adds a .pth file. Python runs the import lines in .pth files every time the interpreter starts, so, per the advisory, the code runs as soon as the package is installed, without anything importing agent_framework. Endor Labs adds that this includes pip itself. A hook like this does not need to edit your workflow file.
The OIDC side is documented by GitHub. In the OpenID Connect reference, GitHub says a job needs the id-token: write permission before an OIDC token can be requested. It also says this setting "only enables fetching and setting the OIDC token; it does not grant write access to other resources." The permission can be set for the whole workflow or for a single job. When it is set, the runner has two environment variables, ACTIONS_ID_TOKEN_REQUEST_URL and ACTIONS_ID_TOKEN_REQUEST_TOKEN, and any code running in that job can use them to request a token for an audience of its choosing. GitHub's own example request uses the audience api://AzureADTokenExchange.
So the permission is not tied to one step. Any process in that job, including a dependency's startup hook, can use it.
What 1.26.2 requested, and what it did not
Per the advisory, 1.26.2 added theft of GitHub Actions OIDC tokens, using the three variables ACTIONS_ID_TOKEN_REQUEST_URL, ACTIONS_ID_TOKEN_REQUEST_TOKEN and ACTIONS_RUNTIME_TOKEN. Wiz and Endor Labs both report that, in workflows with id-token: write, it requested tokens for two audiences: api://AzureADTokenExchange and https://management.azure.com/. Wiz says that where an Entra ID federated credential trusts the workflow, tokens like these can be exchanged for Azure access with no stored secret. Wiz also says stolen managed-identity and OIDC-exchanged tokens are valid for up to 24 hours.
Both versions also went after other things. The advisory lists environment variables with names containing words such as TOKEN, SECRET and PASSWORD, other processes' environment, credential files such as .npmrc and .git-credentials, Azure DevOps OIDC tokens and Azure managed-identity tokens. This page covers only the Actions OIDC part.
What the cited sources do not say matters just as much. None of them reports that it requested a token for PyPI, that it created a PyPI publishing token, or that it uploaded anything to a registry using a stolen Actions token. No source cited here reports a swapped GitHub release either.
The trusted publishing parallel
PyPI trusted publishing uses the same permission and the same request. In PyPI's publishing guide, a job asks GitHub for an OIDC token with the audience pypi, sends it to PyPI, and gets back a short-lived API token. PyPI says the id-token: write permission is strongly recommended at job level and discouraged at workflow level.
PyPI's security model is direct about the risk:
- OIDC tokens "expire quickly, but an attacker who successfully intercepts one can use it to generate API tokens until it expires."
- "Any workflow defined in a repository can request an OIDC token, with any audience, so long as it has the
id-token: writepermission." - Weaknesses in the workflows you register as trusted publishers "can be equivalent to credential compromise," so "treat your Trusted Publishers as if they are API tokens."
PyPI's recommendations include a separate, least-privileged publishing workflow (it suggests naming it release.yml), a dedicated environment with manual approvers, and a publishing job with only two steps: fetch the built files from a separate build job, then publish. A separate build job keeps the number of steps that can reach the OIDC token to a minimum.
To be clear, the agent-framework incident is not a reported theft of a PyPI trusted publishing token. It shows that the request path trusted publishing depends on can be reached by a dependency, if the job installing that dependency also has id-token: write.
How the attacker got in
This is still open. Wiz's November 18 update says the attacker appears to have compromised a client certificate and private key for Microsoft's ESRP release pipeline. It says a first publish attempt from AWS was rejected by IP filtering and a second from Microsoft-owned IP space succeeded, and that how the credentials were obtained is not yet known. That is Wiz's analysis. The sources cited here do not include a Microsoft statement confirming it.
A short checklist for maintainers
- Look for it: search lockfiles, CI logs, virtualenvs and container images for
agent-framework1.26.1 or 1.26.2. Insite-packages, look foragent_framework_meta.pth(1.26.1) andaf_runtime_diag.pth(1.26.2). Searching only for the 1.26.1 names would miss 1.26.2. - If you installed either version: treat that environment as exposed and rotate what it could reach, including CI and GitHub Actions secrets. For workflows that installed 1.26.2 with
id-token: write, Wiz says to treat tokens for the two Azure audiences as exposed and to review the federated credentials that trust those workflows. - Move
id-token: writeoff install and test jobs. Set it on the one job that needs it. Endor Labs says a job that installs dependencies should not also hold a token that can reach your cloud account. - Narrow what a token can do. Tie federated credentials and trusted publishers to a specific repository, workflow file and environment.
- Pin and hash your installs. Endor Labs suggests pinning to 1.26.0 and installing with
pip install --require-hashes, so an unpinned install cannot pick up a same-day malicious file. - Consider a minimum release age. Endor says a 24-hour minimum age in a package proxy would have kept both versions out of builds that respected it.
- Do not treat "we use OIDC instead of stored keys" as enough on its own. A short-lived token can still be used while it is valid.
Where release integrity fits
ReleaseLock checks whether a GitHub release can be swapped after it is published. This incident is a different kind of event: malicious uploads to PyPI, and tokens requested for Azure. We have not seen a source reporting a GitHub release swap in it. The connection is the risk path. A stolen publishing credential is what a release swap needs, and a job that installs unpinned code while holding id-token: write gives an attacker a chance to request one.
For related reading, see stolen GitHub tokens in the wfx-loot campaign, what stolen tokens could do to releases, why valid provenance is not proof of safety, what workflow lockfiles do and do not lock and what GitHub's log secret scanning misses. To check whether a tool you install has a locked release, search the ReleaseLock directory.
Quick answers
Can a compromised dependency steal my GitHub Actions OIDC token?
Yes, if the job has id-token: write. That permission puts the token request URL and request token in the job environment, and GitHub says it enables fetching the OIDC token. Wiz and Endor Labs report that malicious agent-framework 1.26.2 requested Actions OIDC tokens this way.
Which agent-framework versions were malicious?
GitHub advisory GHSA-764m-3ppc-5m73 lists exactly 1.26.1 and 1.26.2, published on November 17, 2026 at 20:35 UTC and 21:08 UTC. Both have been removed from PyPI. Version 1.26.0 and earlier are not affected.
Did agent-framework steal a PyPI publishing token or swap a release?
No source cited on this page says so. Wiz and Endor Labs report that 1.26.2 requested tokens for two Azure audiences, not for PyPI, and no cited source reports a swapped GitHub release or a malicious upload made with a stolen Actions token.
How do I reduce the risk from id-token: write?
Grant it only to the one job that needs it, not to install or test jobs or the whole workflow. Tie federated credentials and trusted publishers to a specific repository, workflow file and environment, and pin and hash your installs.
What should I do if I installed 1.26.1 or 1.26.2?
The GitHub advisory says to treat the environment as exposed and rotate the credentials reachable from it, including CI and GitHub Actions secrets. Wiz also says to review the federated credentials that trust workflows which installed 1.26.2 with id-token: write.
Sources
- GitHub Advisory GHSA-764m-3ppc-5m73: Malicious code in agent-framework (PyPI)
- Endor Labs, Nov 17, 2026: agent-framework compromised, Python startup hooks steal Azure and CI credentials
- Wiz, Nov 17, 2026 (updated Nov 18): Microsoft agent-framework compromised
- GitHub Docs: OpenID Connect reference
- PyPI Docs: Publishing with a Trusted Publisher
- PyPI Docs: Security model and considerations