When Trusted Downloads Turn Malicious
In two weeks in November 2026, three trusted downloads turned malicious: Microsoft's AI package on PyPI, Optimizely's script on 178 major sites, and Bitwarden's CLI on npm. Here is what happened and what to check.
Three times in two weeks, the download did everything right and still turned out to be poison. Not a dodgy mirror, not a typo in the package name, not a cracked copy from a forum. The official Microsoft package on PyPI. The official Optimizely script on the BBC, CNN, and Zoom. The official Bitwarden CLI on npm, published under Bitwarden’s own name.
I have spent years telling readers to download from the official source and check the name twice. That advice is still correct. It is also, as of this month, no longer enough. In November 2026 the attack moved upstream, into the publisher’s own pipeline, and the file you trusted was the file that got you. This is a news story with a job attached: check whether any of these three touched you, and if one did, act like it is already too late to just uninstall it.
Microsoft’s AI package, poisoned on PyPI
On November 17, two releases of agent-framework, the Python package for Microsoft’s Agent Framework, appeared on PyPI: version 1.26.1 at 20:35 UTC, then 1.26.2 thirty-three minutes later. Both carried a credential stealer. Both were quarantined within the hour. The package gets around 190,000 downloads a month, and the last safe version is 1.26.0, released November 12.
The clever part is how little the attacker had to change. The malicious releases shipped wheels only, no source distribution, and repackaged the clean 1.26.0 wheel with one addition: a .pth file dropped into site-packages. Python executes any line starting with import in a .pth file every time the interpreter starts. So the stealer ran on every Python launch in an affected environment, including pip itself, whether or not any code ever imported Agent Framework.
What it grabbed tells you who it was built for. Environment variables with credential-like names. Files like .npmrc, .netrc, .git-credentials, pip.conf, Docker’s config, and Azure CLI credentials. Azure managed identity tokens, Azure DevOps OIDC tokens, and in 1.26.2, GitHub Actions OIDC tokens as well. Everything went to a single webhook.site address. This was not built for someone’s laptop. It was built for developer machines and CI runners, the places where the keys to everything else live.
The second release is the detail that should worry you most. Version 1.26.2 was written to survive the first one’s removal: the package’s own code was restored to byte-identical clean 1.26.0, and the payload moved to a new module with its own .pth file. Whoever published 1.26.1 still had publishing access after it went up, and used it to ship a revised version. Microsoft took the Agent Framework repository offline on November 25 and published an advisory, PYSEC-2026-4388. It has not said publicly how the attacker got publishing access. The .NET packages were not affected.
A download progress bar, the moment before you find out what you actually got (Photo: American Chemical Society)
Optimizely turned 178 websites into a malware channel
The day before, on November 16, an attacker exploited a flaw in the account signup flow of Optimizely Web Experimentation and wrote malicious JavaScript into customer projects. Security researcher Scott Helme of Report URI, who monitors third-party script changes, found the loader in 188 snippets belonging to 178 organizations out of the 1,611 he checked. The list reads like a front page: Zoom, the BBC, CNN, Fox News, Salesforce, GitLab, IKEA, HSBC, Equifax, Air France-KLM, Ledger, and Peacock. The first injection appeared at 04:21 UTC. The last infected file was cleaned at 23:11 UTC the same day. Optimizely confirmed the incident, fixed the flaw, and removed the injected code.
Nobody hacked those 178 sites. Their own pages served the malware because every one of them loads a script from Optimizely’s CDN, and the script came from cdn.optimizely.com under Optimizely’s own certificate. The payload was a multi-purpose kit: it swapped cryptocurrency wallet addresses in page text, form fields, the clipboard, and outgoing requests; it skimmed card numbers typed into the sites’ own payment forms; it stole cookies and screenshots; and it served the Coruna and DarkSword exploit kits to iPhones and iPads running iOS 18.6 or older.
Here is the number I keep coming back to. Report URI found that only about 15 percent of the affected organizations, 24 out of 178, had a Content Security Policy strict enough to block the attack. A CSP is the one control built exactly for this scenario: it tells the browser which scripts are allowed to run, so a poisoned third-party script gets stopped at the door. Most of the biggest sites on the internet did not have one that worked. That is not a failure of the technology. It is a failure to turn it on.
Bitwarden’s CLI, and a worm that keeps coming back
The third case landed on npm. Version 2026.4.0 of @bitwarden/cli, around 78,000 weekly downloads, shipped with a malicious preinstall hook that fires automatically on npm install, no user interaction needed. The hook downloads the Bun runtime and runs a heavily obfuscated payload that harvests SSH keys, AWS and GCP credentials, cloud secret manager contents, and even MCP configuration files for AI assistants.
That name is the thread connecting all of this. Shai-Hulud is a self-propagating credential-stealing worm that has hit npm in several waves through the autumn, each time through a hijacked maintainer account, each time republishing trusted packages with a poisoned install hook. Aikido’s researchers believe the attacker got in by infecting Bitwarden’s own CI pipeline, bypassing its trusted publishing controls. Their write-up names the payload “Shai-Hulud: The Third Coming.” The pattern is the same in all three November cases: the attacker did not need to fool you. They needed to fool, or break into, the machine that publishes the thing you trust.
| Incident | When | What was poisoned | What it took |
|---|---|---|---|
| Microsoft Agent Framework | Nov 17, 2026 | agent-framework 1.26.1 and 1.26.2 on PyPI | Azure and GitHub tokens, cloud credentials, config files |
| Optimizely Web | Nov 16, 2026 | Experimentation scripts on 178 sites | Crypto wallets, card numbers, cookies, screenshots |
| Bitwarden CLI | Late Nov 2026 | @bitwarden/cli 2026.4.0 on npm | SSH keys, AWS/GCP credentials, MCP configs |
Check yours now
I wrote about this exact shape of problem a week ago with the GL.iNet router flaw, and the advice rhymes: the question is never whether you did something wrong. The question is whether a thing you already trusted changed under you. Run these checks today, not someday.
- Python environments: run
pip show agent-frameworkand look at the version. If it says 1.26.1 or 1.26.2, treat the machine as compromised. Search your lockfiles and requirements files for those version numbers, and searchsite-packagesforagent_framework_meta.pth,af_runtime_diag.pth, andaf_runtime_diag.py. Microsoft’s guidance is blunt, and I agree with it: removing the package is not enough. Rotate every credential that environment could reach. A password manager is what makes that job survivable, and the 1Password breach is a good reminder of why the vault itself is the safe part. - Node projects: check your lockfiles for
@bitwarden/cliat 2026.4.0, and for anypreinstallhook you do not recognize. If it is there, rotate SSH keys and cloud credentials, and review your repositories for unexpected public repos or workflow files. The worm creates public GitHub repositories to dump stolen secrets. - If you browsed on November 16: update any iPhone or iPad to iOS 18.7.3 or later, or iOS 26.3 or later. If you sent crypto or paid by card on one of the affected sites that day, verify the wallet address you actually paid and watch your statements. The site list is published in Report URI’s investigation.
- Going forward, pin your versions. A lockfile that pins exact versions means a poisoned release cannot reach you through an automatic update. It is boring, it is unglamorous, and it is the single most effective defense in this article. When you do bump a version, check the advisory first and verify the hash. And if you run a website, a real Content Security Policy is no longer optional. It was the difference between blocked and owned for 154 organizations on November 16.
The install hook runs before you do anything at all (Photo: Business Reporter)
My take
I keep hearing the same reassurance after each of these: the vendor caught it fast, the window was short, the package was quarantined within the hour. All true, and all beside the point. A forty-five minute window on a package with 190,000 monthly downloads is not a near miss. It is a mass exposure event that happened to be noticed quickly. The Optimizely cleanup took under a day, and in that day some of the most visited sites on earth served a card skimmer to everyone who loaded them.
My honest position is this: the software supply chain is now the front line, and most of us are still defending it like it is 2015. We audit our own code and then pip install the world with no questions asked. Pinning versions, checking advisories, and running a strict CSP will not make you invulnerable. They will make you the person the worm passes over on its way to someone easier, and right now that is the best deal on offer. Trust is a dependency like any other. Pin it, check it, and rotate it like the credentials it protects.
Frequently asked questions
I installed agent-framework 1.26.1 or 1.26.2. What do I do?
Treat the machine as compromised. Remove the package, then rotate every credential that machine could reach: cloud keys, GitHub tokens, Azure tokens, and any secrets in environment variables or config files. Version 1.26.0 is the last safe release.
I visited a site that uses Optimizely on November 16. Am I affected?
Probably not, but check two things. If you use an iPhone or iPad, update to iOS 18.7.3 or later, or iOS 26.3 or later. If you sent crypto or paid by card on an affected site that day, verify the wallet address you paid and watch your card statements.
How do I know if a package I installed was compromised?
Check the exact version you installed against the vendor’s advisory, then check your lockfile and installed files for the version numbers and filenames the advisory names. A clean-looking app is no evidence: in all three November cases the poisoned software kept working normally.
Does pinning versions really stop this kind of attack?
It stops the silent-upgrade version of it. A pinned lockfile means a poisoned release cannot reach you through an automatic update. It does not help if the pinned version itself is the poisoned one, which is why you also check advisories and verify hashes when you bump a version.
Three new loop and stack articles every day, Monday to Sunday. Subscribe and follow.it emails you when one lands. No spam, unsubscribe anytime.