Get the Zoom link
Cloud Security Office Hours Banner

Microsoft agent-framework PyPI Hijack 2026

Step-by-step kill chain mapped to MITRE ATT&CK Cloud, sourced from official post-mortems and primary technical analyses.

November 2026 Critical PyPI / Azure / CI

Microsoft agent-framework PyPI Hijack - Release-Service Certificate Assessed as Compromised, How Unknown → Retry From Microsoft IP Space → Auto-Approved, Malware Scan Passed → .pth Stealer on Every Python Start → New Version Two Minutes After Quarantine

At 20:35 UTC on November 17, 2026, agent-framework 1.26.1 appeared on PyPI under Microsoft's official project. It is the meta-package of Microsoft Agent Framework, which Wiz says gets almost 200,000 downloads a month; that figure counts the whole package, not the bad versions. PyPI's advisory says versions 1.26.1 and 1.26.2 "were uploaded to PyPI on 2026-11-17 without authorization, as wheel-only releases repackaged from the legitimate 1.26.0 wheel." Each added a .pth startup hook that runs a credential stealer whenever Python starts in that environment, whether or not anything imports the package. It gathered secret-like environment variables, other processes' environments and credential files, requested fresh Azure tokens and, in 1.26.2, GitHub Actions OIDC tokens, and posted the lot to a webhook.site URL. By StepSecurity's timeline, PyPI quarantined 1.26.1 at 21:06:16, the attacker uploaded 1.26.2 at 21:08:39, and PyPI quarantined that at 21:16:44. PyPI says both versions have been removed.

How the attacker could publish rests on one research team's assessment, and Microsoft has not confirmed it. The attacker's tooling reported its progress to the same public webhook it used for exfiltration. From those reports Wiz Research says the attacker "appears to have compromised a client certificate and private key for Microsoft ESRP (Engineering System Release Pipeline), the internal service Microsoft uses to sign and publish this package," and its chart labels this "Root cause (assessed)". In Wiz's account, ESRP's IP filtering rejected a first publish attempt from AWS, and a second attempt from Microsoft-owned IP space was approved automatically, passed ESRP's malware scan and went live. How the certificate and key were obtained "is not yet known," Wiz says. Microsoft has not confirmed or explained the root cause. A Microsoft spokesperson's statement says the company has "made some repositories private while we investigate malicious content," and PyPI says it "worked with Microsoft to review the project's accounts and complete remediation steps" without naming a mechanism. Wiz first published on November 17 and added the ESRP finding on November 18.

The free webhook stored 50 requests, and among them Wiz counts "only three unique, successful cases of exfiltration of victim data": an Azure DevOps build pool, a GitHub Actions job in an open-source repository, and an Azure App Service. Wiz withholds their identities, and the count covers only what the webhook stored. All three are build or cloud workloads. No source gives the number of installs of the two bad versions, and none reports the stolen credentials being used.

31 and 8 minutes on PyPI before quarantine, for 1.26.1 (JFrog) and 1.26.2 (StepSecurity)
2 min 23 s between PyPI quarantining 1.26.1 and the upload of 1.26.2, per StepSecurity
3 victims whose data Wiz found among the 50 requests the webhook stored; Wiz withholds their names
Threat actor: not attributed; JFrog and the OpenSSF malicious-package advisory say so explicitly, and Wiz names only the tooling, which identified itself as Cairn, an open-source AI penetration-testing framework

Disclosure: the root-cause assessment and the victim count on this page come from Wiz Research, and the site's author works at Wiz. Microsoft has not confirmed the assessment. JFrog, StepSecurity, SafeDep, Socket, Aikido and others published their own analyses of the payload. Every source is linked so you can read it directly.

📄 Wiz - Microsoft agent-framework Compromised: Credential Stealer Targets Azure and CI Pipelines ↗ 📄 PyPI Security - PYSEC-2026-4388 ↗ 📄 JFrog - Microsoft's agent-framework Hijacked on PyPI via Silent .pth Startup Hook ↗ 📄 StepSecurity - Microsoft agent-framework PyPI Package Compromised ↗

Slides: download the PDF or make your own editable copy (copying needs a Google account). The slides are licensed CC BY-NC 4.0.

⚡ Initial Access: A Release Credential Nobody Has Explained
01
The attacker held what Wiz assesses was a client certificate and private key for ESRP, Microsoft's internal signing and release service, and how it got them is not known
T1078 - Valid Accounts

ESRP is, in Wiz's words, "the internal service Microsoft uses to sign and publish this package." Wiz assesses that the attacker "appears to have compromised a client certificate and private key" for it. The evidence is the attacker's own status reports to the exfiltration webhook, which included a connectivity probe named CAIRN_ESRP_PROBE2 and, after the release, what Wiz's chart calls a "full ESRP release record". Wiz is plain about the gap: "How the credentials were obtained is not yet known." Microsoft had not answered BleepingComputer's question about the point of breach by publication time, and this page found no Microsoft advisory on the incident as of November 23. StepSecurity wrote that the available evidence does not establish "the initial access vector, the specific account or credential used, or the uploader's identity."

What can be seen from outside points away from a poisoned build workflow. On November 17 Wiz found no python-1.26.1 tag or release in microsoft/agent-framework, and the main branch did not contain the malicious code. No source reports a compromised workflow. By Wiz's account, the vector here also differs from Microsoft's durabletask package in May 2026, which Wiz reports was compromised after its PyPI token was stolen; of the two, Wiz says, "We have not linked the two incidents." The closest chain on this site is Storm-0558, where a Microsoft signing key was used to forge access tokens and the Cyber Safety Review Board concluded that Microsoft does not know how the key was obtained.

This page maps only the part Wiz observed through the attacker's own beacons: a credential ESRP accepted, which ATT&CK files under Valid Accounts. The theft itself is unknown, so no credential-access technique is mapped for it. Nobody has said whether the certificate has been revoked. StepSecurity wrote that the evidence "does not establish whether that access remains available now." As of November 23, 1.26.0 is again the latest release on PyPI.

Service: ESRP (Engineering System Release Pipeline), which signs and publishes the package (Wiz)
Credential: a client certificate and private key the attacker "appears to have compromised" (Wiz)
How obtained: "not yet known" (Wiz)
Confirmed by Microsoft: no
Revoked: not stated by anyone
Detect: a published version with no matching tag or commit in the source repository
ESRPClient CertificateRoot Cause AssessedT1078
🧰 Resource Development: An AI Pentest Framework and Two Networks
02
The attacker's tooling identified itself as Cairn, an open-source AI penetration-testing framework, and ran from a host in AWS and another in Microsoft-owned IP space
T1588.007 - Obtain Capabilities: Artificial Intelligence T1583.003 - Acquire Infrastructure: Virtual Private Server

Wiz could watch part of the operation because "the attacker's tooling reported its own progress to the same publicly accessible webhook it used for exfiltration." That tooling identified itself as Cairn, an open-source AI penetration-testing framework: the probe was named CAIRN_ESRP_PROBE2, and the package was staged at /tmp/cairn_pkg. At 20:28:07 UTC the attacker ran the stealer on its own machine, which Wiz places in AWS in Singapore at 13.215.157.103. The capture included an AI coding agent's configuration that Wiz says appears to be the open-source Pi harness, backed by a GLM-family model (pi_glm53) through a local proxy.

The attacker also had a host in what Wiz calls "Microsoft-owned IP space", which decided the publish step. Wiz does not say whether that was capacity rented from Azure or a Microsoft machine the attacker controlled. Nobody has attributed the attack. The OpenSSF malicious-package advisory, mirrored by GitHub, says "We have not attributed this to a known campaign," and JFrog says it has not attributed the attack to a known threat group.

Tooling: identifies itself as Cairn, an open-source AI penetration-testing framework (Wiz)
Agent config on the attacker's host: appears to be the Pi harness with GLM-family model pi_glm53, through a local proxy (Wiz)
AWS host: 13.215.157.103, Singapore (Wiz)
Second host: "Microsoft-owned IP space"; what kind, Wiz does not say
Tell: the attacker's progress reports went to the same public URL as the stolen data
CairnAI ToolingAWST1588.007T1583.003
🥸 Stealth: A Clean Wheel, Repacked Outside the Build
03
The attacker unpacked the clean 1.26.0 wheel, added a startup hook and files named like telemetry, and zipped it back up outside Microsoft's build
T1036 - Masquerading T1027 - Obfuscated Files or Information

The 1.26.1 wheel is the legitimate 1.26.0 wheel with a new agent_framework_meta.pth, a new agent_framework_meta/_telemetry.py, and a hook added to agent_framework_meta/__init__.py. JFrog reads the ZIP headers as a repack with Info-ZIP 3.0 at 20:26:19 UTC, under uid 1000, on a host whose clock was set to UTC+8, while the WHEEL file still claimed Generator: flit 4.2.0. The dependency on agent-framework-core[all]==1.26.0 was left alone, so the framework kept working. SafeDep notes the wheel grew from 6,681 to 10,402 bytes.

The names were chosen to pass as SDK diagnostics. Wiz quotes the hook's description, "Lightweight runtime diagnostics hook", and its user-agent, af-runtime-diagnostics/1, and the exfiltration URL was base64-encoded. Aikido's reading: "That fits someone who unpacked a legitimate wheel, edited it by hand, and uploaded the repacked file with valid publishing credentials." JFrog says the wheel came "from a local script rather than Microsoft's Azure DevOps and ESRP release pipeline," which reads as if ESRP was bypassed, while Wiz says the release went through ESRP. Both can hold if the wheel was built outside the pipeline and then submitted to ESRP. That is this page's reading; neither source puts it that way.

As with LiteLLM / TeamPCP, the release had no matching tag in the project's repository, the cheapest check a consumer can run against a direct upload.

Added: agent_framework_meta.pth, agent_framework_meta/_telemetry.py, a hook in agent_framework_meta/__init__.py
Repacked: Info-ZIP 3.0, 20:26:19 UTC, uid 1000, host clock UTC+8 (JFrog)
Left as before: WHEEL "Generator: flit 4.2.0"; dependency agent-framework-core[all]==1.26.0
Disguise: "Lightweight runtime diagnostics hook", user-agent af-runtime-diagnostics/1, base64-encoded URL
Detect: a release that adds a .pth file the previous release did not have, with no matching tag
Repacked Wheel.pthNo Git TagT1036T1027
⚡ Initial Access: Through Microsoft's Own Release Service, by Wiz's Account
04
By Wiz's account, ESRP refused the publish from AWS, then accepted it from Microsoft-owned IP space, approved it automatically and passed it through its malware scan
T1195.002 - Compromise Software Supply Chain

Wiz's chart of the publish reads like a release log. At 20:25:06 UTC the CAIRN_ESRP_PROBE2 probe reached the webhook from Microsoft IP space. At 20:28:56 a publish attempt from AWS was rejected by ESRP's IP filtering with HTTP 403, and the tooling reported "publish rejected". At 20:33:00 the release was submitted again from Microsoft IP space, and ESRP auto-approved it at 20:33:08. Its malware scan ran from 20:33:09 to 20:35:15 and passed, and 1.26.1 was live on PyPI at 20:35:20, 2 minutes 20 seconds after submission. At 20:37:12 the tooling sent the webhook what Wiz's chart calls a "full ESRP release record".

Three controls sat in the path, and Wiz's chart shows each one. The IP filter was the only one that refused anything, and it gave way four minutes later when the request came from Microsoft's address space. Approval was automatic. The malware scan passed a wheel carrying an executable .pth file. On PyPI, StepSecurity reports, both malicious wheels carried the uploader user-agent RestSharp/106.13.0.0, a .NET HTTP client, and no provenance attestation. Neither did the legitimate 1.26.0, SafeDep found, so there was no attested release to compare against. StepSecurity adds that "the absence of an attestation alone does not identify the upload mechanism," and no source says what user-agent Microsoft's legitimate uploads carry.

20:28:56 UTC: publish from AWS rejected by ESRP IP filtering, HTTP 403
20:33:00 UTC: submitted from Microsoft IP space
20:33:08 UTC: "auto-approved"
20:33:09 to 20:35:15 UTC: malware scan "passed"
20:35:20 UTC: 1.26.1 live on PyPI, wheel only
Why it worked: an IP filter that Microsoft-owned address space satisfied, automatic approval, and a scan that passed a .pth file (Wiz's chart)
ESRPIP Allow-ListAuto-ApprovalNo ProvenanceT1195.002T1078
💻 Execution: Every Python Start, Imported or Not
05
Wherever 1.26.1 was installed, the .pth hook ran the stealer on every Python start, pip included
T1546.018 - Event Triggered Execution: Python Startup Hooks T1059.006 - Python

Python's site module processes .pth files in site-packages at interpreter startup and executes lines that begin with import. So, as JFrog points out, pip, pytest, IDE language servers and container entrypoints all fired the hook, whether or not anything imported agent-framework. The hook forked a detached process with os.setsid(), or started a daemon thread on Windows, was guarded by an _AF_TEL=1 environment variable, and silenced every error. The same startup trick carried the LiteLLM / TeamPCP and LiteLLM 1.107.0 payloads.

Automation moved quickly. JFrog saw Renovate open upgrade pull requests downstream "within six minutes of 1.26.1 landing on PyPI," and Wiz's chart puts the first victim's data at the webhook about five minutes after the release went live. The payload had no second stage and no worm, and JFrog reports "no persistence outside site-packages." Deleting the files stops new runs, though StepSecurity warns that removing a hook alone "does not terminate an existing collector," and any Python started before the files are gone runs the stealer again.

Files (1.26.1): agent_framework_meta.pth, agent_framework_meta/_telemetry.py
Trigger: every interpreter start in the environment, including pip and pytest (JFrog)
Behaviour: forks with os.setsid() or a daemon thread on Windows; guarded by _AF_TEL=1; errors silenced
First victim: about 5 minutes after 1.26.1 went live (Wiz's chart)
Hunt command: find / -name 'agent_framework_meta.pth' -o -name 'af_runtime_diag.pth' 2>/dev/null
.pth Autorunsite-packagesRenovateT1546.018T1059.006
🔑 Credential Access: Environments, Files and Fresh Azure Tokens
06
The stealer read secret-like environment variables, other processes' environments and credential files, then asked Azure for fresh tokens
T1552.001 - Unsecured Credentials: Credentials In Files T1552.005 - Unsecured Credentials: Cloud Instance Metadata API T1528 - Steal Application Access Token

It took the host name, user, working directory and the first 20 command-line arguments, then every environment variable whose name contained one of 31 case-insensitive substrings, by JFrog's count. It read up to 300 /proc/*/environ files, which hold other processes' environments, and up to 60 credential files: ~/.azure, .npmrc, pip.conf, .netrc, .git-credentials, .docker/config.json, Hugging Face tokens, Microsoft Foundry configuration, the Azure DevOps agent's .credentials, and .env and JSON files under /app and /workspace.

Then it asked for new tokens. From the instance metadata service at 169.254.169.254, or the App Service IDENTITY_ENDPOINT, it requested managed identity tokens for 12 Azure resources by the count of Wiz, JFrog and Orca, including Resource Manager, Graph, Key Vault, Storage, Container Registry and Azure DevOps; Chainguard counts nine resource types. Wiz and JFrog say such tokens can stay valid for up to 24 hours. It also asked for an Azure DevOps OIDC token for api://AzureADTokenExchange through SYSTEM_OIDCREQUESTURI and SYSTEM_ACCESSTOKEN, and whether that worked is disputed. JFrog says the request lacks serviceConnectionId, so real endpoints answer HTTP 400, though SYSTEM_ACCESSTOKEN itself still leaked through the environment. StepSecurity says static analysis cannot confirm that any token was issued. On a Linux host outside Azure that drops traffic to 169.254.169.254, JFrog notes, the metadata requests time out one after another for about 104 seconds before the data goes out.

What it did not take matters for scoping, and AWS is only partly out. None of Wiz, JFrog, StepSecurity, SafeDep, Socket or Orca lists AWS credential files or AWS metadata credential paths among the targets. All six do list AWS among the environment variable name substrings, so AWS keys held in the environment were in scope. The stealer also read .env files under /app and /workspace, and it kept entries from other processes' environments containing TOKEN, SECRET, PASSWORD or KEY= (SafeDep, Socket, StepSecurity), a filter an AWS secret key's variable name passes (this page's reading). JFrog lists AWS among the keys "in environment variables or .env files" to rotate. None of Wiz, JFrog, Socket or Orca lists GCP, Kubernetes or SSH keys among its targets.

Environment: names matching 31 substrings (JFrog); up to 300 /proc/*/environ files
Files: ~/.azure, .npmrc, pip.conf, .netrc, .git-credentials, .docker/config.json, Hugging Face tokens, Microsoft Foundry configuration, Azure DevOps agent .credentials; up to 60 files
Azure: managed identity tokens via 169.254.169.254 or IDENTITY_ENDPOINT, 12 Azure resources (Wiz, JFrog, Orca)
Azure DevOps: OIDC request JFrog calls malformed; SYSTEM_ACCESSTOKEN taken from the environment either way
Not targeted: AWS credential files or AWS metadata credential paths, GCP, Kubernetes, SSH keys
AWS still in scope: AWS keys in environment variables or .env files, which JFrog says to rotate
Detect: one managed identity requesting tokens for many resources within seconds, in Entra sign-in logs
Managed IdentityIMDS/proc environAzure DevOpsT1552.001T1552.005T1528T1082
📤 Exfiltration: One POST to a Public Webhook
07
Everything went out in one compressed POST to a webhook.site URL, the same one the attacker's tooling reported to
T1567.004 - Exfiltration Over Web Service: Exfiltration Over Webhook

The stealer packed its findings into one JSON document, compressed it with zlib at level 9, base64-encoded it, and sent it in a single HTTPS POST to webhook[.]site/d381fd80-ec62-42ad-8f5c-d1b15103c9bb?t=telemetry, with no retry and no fallback channel. The attacker's tooling sent its own progress reports to the same URL, which is how Wiz could see the ESRP steps.

Wiz analyzed "the 50 requests that were stored by webhook[.]site's free tier," which span 20:25 to 20:49 UTC; its chart marks the last one "endpoint likely hit 50-request cap". Wiz sets aside the attacker's own requests and those from sandboxes, scanners and tests, and says the remaining 17 "represent only three unique, successful cases of exfiltration of victim data": an Azure DevOps build pool (10 requests), a GitHub Actions job in an open-source repository (4) and an Azure App Service (3). "Victim identities withheld," the chart says. Because the count rests on stored requests alone, this page reads it as a floor. JFrog later received HTTP 429 from the endpoint. For reading your own proxy logs, Wiz says: "A 200 means that host's data was accepted. A 410/429 suggests it was rejected."

Endpoint: webhook[.]site/d381fd80-ec62-42ad-8f5c-d1b15103c9bb?t=telemetry
Encoding: JSON, zlib level 9, base64; one POST, no retry
User-agents: af-runtime-diagnostics/1 and runtime-diagnostics/1 (StepSecurity; Orca)
Stored: 50 requests, 20:25 to 20:49 UTC; three unique victims (Wiz)
Detect: the UUID path in proxy logs, not only the domain, which is a shared service
webhook.siteSingle POSTT1567.004T1560.002
⚡ Initial Access: Two Minutes After Quarantine
08
Two minutes after PyPI quarantined 1.26.1, the attacker uploaded 1.26.2 with renamed files and GitHub Actions OIDC theft added
T1195.002 - Compromise Software Supply Chain T1036 - Masquerading

PyPI quarantined 1.26.1 at 21:06:16 UTC, 31 minutes after it went live. At 21:08:39, "just 2 minutes 23 seconds after the first quarantine" in StepSecurity's words, 1.26.2 appeared. It restored __init__.py byte for byte and moved the hook to af_runtime_diag.pth and af_runtime_diag.py, which defeats a search for 1.26.1's file names and a diff of __init__.py. It added GitHub Actions OIDC token requests for api://AzureADTokenExchange and https://management.azure.com/ in jobs with id-token: write, runner paths such as /home/runner/work/_temp/* and /home/runner/.azure/, and the name substrings ACTIONS, OIDC, RUNNER and ARM_. The file cap rose from 60 to 80. PyPI quarantined 1.26.2 at 21:16:44, eight minutes after upload, and JFrog says "PyPI removed both releases by 21:16." Sources that checked later give about 21:20 (Aikido, Orca) and 21:30 (Wiz) for both versions being gone.

No source describes the path 1.26.2 took to PyPI; StepSecurity notes only that both wheels carried the same uploader user-agent. What the re-publish does show is the gap JFrog names: "Quarantining a single version on PyPI does not revoke the compromised publishing credential." OpenSourceMalware wrote the next morning that the attacker "is believed to still have publishing access because 1.26.2 was published after PyPI quarantined 1.26.1." PyPI's advisory says it worked with Microsoft to review the project's accounts. Microsoft has made repositories private, which The Hacker News identifies as microsoft/agent-framework and microsoft/onnxruntime, and The Register notes that "neither Microsoft nor security researchers have linked the ONNX repo's pull to the malware campaign." GitHub Actions OIDC tokens were also the target in Mini Shai-Hulud, there scraped from runner memory to publish packages.

21:06:16 UTC: 1.26.1 quarantined (StepSecurity; JFrog gives 21:06)
21:08:39 UTC: 1.26.2 uploaded
21:16:44 UTC: 1.26.2 quarantined; both versions since removed (PyPI)
Renamed: af_runtime_diag.pth, af_runtime_diag.py; __init__.py restored
Added: GitHub Actions OIDC for api://AzureADTokenExchange and https://management.azure.com/
Why it worked: quarantine removes a version and leaves the credential that published it (JFrog)
Re-PublishQuarantineGitHub Actions OIDCT1195.002T1036T1528

🛡 How to Defend Against This Chain

If either version ran, stop running Python there before you clean up. Every interpreter start re-runs the hook, so StepSecurity and BleepingComputer both say to isolate affected hosts, containers and runners and not to run pip or Python in the affected environment. StepSecurity also says to terminate any collector process still running, since removing the hook does not stop one. JFrog's procedure differs: set _AF_TEL=1 first, delete the four payload files and __pycache__, and avoid a bare pip uninstall, or use uv pip uninstall followed by uv cache clean. Then rebuild from a clean base pinned to agent-framework==1.26.0 (StepSecurity, JFrog, Orca, Aikido), and lock the whole dependency tree with hashes, using pip-compile --generate-hashes or uv lock, not only agent-framework: SafeDep notes that "a pin on agent-framework alone leaves its four sibling dependencies free to update," and StepSecurity also advises a hash-pinned lockfile. Block 1.26.1 and 1.26.2 and evict them from mirrors and caches (StepSecurity, JFrog, Orca).
Find every place the versions could have landed, including bots' pull requests. Search lockfiles, requirements, CI logs, virtual environments, container images, mirrors and caches for 1.26.1 and 1.26.2, and hosts for agent_framework_meta.pth, agent_framework_meta/_telemetry.py, af_runtime_diag.pth, af_runtime_diag.py and the _AF_TEL variable (Wiz, PyPI's advisory, StepSecurity, Orca). JFrog adds Renovate and Dependabot pull requests from November 17. In proxy and DNS logs, search for the UUID path rather than the domain, a shared service (OpenSourceMalware, Chainguard), and for the user-agents af-runtime-diagnostics/1 and runtime-diagnostics/1 (StepSecurity, Orca).
Rotate from a clean machine, then deal with the tokens rotation cannot reach. Wiz, JFrog, StepSecurity, SafeDep and PyPI's advisory all say to rotate every secret present on an affected host or runner: Azure CLI sessions, Azure DevOps personal access tokens and service connections, npm, PyPI, NuGet, Docker and Hugging Face tokens, git credentials and LLM API keys. JFrog adds revoking Entra ID user sessions wherever ~/.azure token caches existed, and StepSecurity adds re-registering self-hosted runners whose credential files were exposed. Rotation does not touch tokens already issued, which SafeDep and StepSecurity both point out, and Wiz and JFrog put their lifetime at up to 24 hours. Review Entra ID sign-in and activity logs for the managed identities and federated credentials involved (Wiz, JFrog, StepSecurity). JFrog adds recycling the affected compute, and narrowing or removing role assignments if you detect unauthorized replay; StepSecurity also says to review managed-identity role assignments.
For GitHub Actions jobs that installed 1.26.2 with id-token: write, treat the job's Azure federation as exposed. Wiz advises treating OIDC tokens for api://AzureADTokenExchange and https://management.azure.com/ as exposed, reviewing the Entra federated credentials that trust those repositories, and rotating the repository and organization secrets the job could read. StepSecurity likewise says to treat tokens the job could obtain as exposed and to audit GitHub OIDC permissions and Azure federated credentials, and OpenSourceMalware says to revoke GitHub Actions runtime credentials and invalidate OIDC-derived sessions where possible.
Treat a release-service credential as the publisher's identity. By Wiz's assessment, one client certificate and key let the attacker submit a release that Microsoft's own service approved, scanned and published under Microsoft's name. Most PyPI chains on this site turn on a registry token or the project's own build workflow, as in LiteLLM / TeamPCP and Ultralytics. If Wiz is right, this one sits further along, in the vendor's internal release service. In 3CX the attacker had to reach the vendor's build environments; here, by Wiz's account, a credential for the service at the end of the pipeline was enough. This page's suggestion, since Microsoft has said nothing about how ESRP authenticates clients: keep any credential that can submit releases in hardware or bound to the build system's workload identity rather than in a file that can be copied, and alert on any use of it from outside the build pipeline.
Allow-list the build system, not the company's address space. ESRP's IP filter turned away the attempt from AWS and let the same credential through four minutes later from Microsoft-owned IP space, per Wiz's chart. Wiz does not say whether that address space was rented Azure capacity or a Microsoft machine. If it was the former, a filter keyed to a cloud provider's ranges admits that provider's customers. This page's reading is that a release service's network rule should name the build agents allowed to call it, paired with a check on the caller's workload identity, so that a stolen certificate fails from anywhere else.
Refuse a release that no commit or tag explains. Approval was automatic and the malware scan passed a repackaged wheel with a new .pth file, while the repository had no python-1.26.1 tag and no malicious code on main. This page suggests two checks for a release service: compare each artifact with the source commit it claims, which here would have found nothing to match, and hold for a human any Python release that adds a .pth file the previous release did not have. Consumers can run the same check: as on the LiteLLM / TeamPCP page, fail a build when a new version has no matching tag. Codecov is the older lesson in the same vein: an artifact swapped outside the build ran for two months until one customer compared a published hash with what they had downloaded.
Publish attestations so a bad release has something to be compared with, and hold new versions before adopting them. Neither the malicious wheels (StepSecurity) nor the legitimate 1.26.0 (SafeDep) carried a provenance attestation, and PyPI shows none for any release of the project (this page's check, November 23), so there was no record of how a good release was built to check a bad one against. Attestations do not stop a release that comes through the official path, as Ultralytics and LiteLLM 1.107.0 show. This page's reading is that one tied to the source repository and build workflow would have shown that 1.26.1 had no commit behind it. On the consuming side, Renovate opened upgrade pull requests within six minutes (JFrog), and both versions were gone within an hour of the first upload. StepSecurity and Chainguard both point to a cooldown that holds a new release until it has aged. Chainguard says a cooldown policy keeps "a same-day compromise like this one out of reach"; StepSecurity adds that a cooldown check on dependency pull requests "does not protect every install path," because an unpinned dependency can resolve to the newest release without a pull request.
When a publishing credential is stolen, revoke the credential, not only the versions. Quarantining 1.26.1 left the credential working, and 1.26.2 followed 2 minutes 23 seconds later. JFrog's point is that "quarantining a single version on PyPI does not revoke the compromised publishing credential," and OpenSourceMalware drew the same conclusion from the timing. For a publisher, that means revoking every credential that can release the project, including registry tokens, trusted publisher bindings and any release-service credential, alongside pulling the versions. Microsoft has not said whether the ESRP certificate has been revoked.

Related defense topics