An official Microsoft package stole credentials on PyPI: what to check if you use AI agents
Two versions of Microsoft's agent-framework reached PyPI carrying a credential stealer, one day after Google warned of attackers using AI to exploit flaws without human intervention. Here is what development and IT teams in Latin America should check right now.
Photo: Mohammad Rahmani on Unsplash
For a few hours on November 17, anyone who typed `pip install agent-framework` into their terminal, the most common command to install Microsoft's tool for building artificial intelligence agents, got more than useful code. Versions 1.26.1 and 1.26.2, published that day on PyPI, the large public repository from which Python packages are downloaded, contained a credential stealer. The unsettling part is that this was not a lookalike with a similar name, but the official package, as confirmed by the security firm Wiz, Endor Labs and BleepingComputer.
That detail changes the rules. Until now, one of the most frequently repeated defenses against this type of attack was carefully checking the name of every dependency, because criminals often publish copies with a single letter changed. Here, that precaution would have been useless.
A stealer that ran just by starting Python
The mechanism was especially stealthy. According to Wiz and Endor Labs, the malicious code was hidden in .pth files, hooks that Python reads automatically every time it starts. That means the stealer ran even if the program never used the package. Its targets were credentials for Azure, Microsoft's cloud, and for continuous integration (CI) pipelines, the automated chains that build, test and publish software at companies.
According to SecurityWeek, the malicious versions were distributed only as prebuilt packages, without source code, and Wiz found no traces of the attack in Microsoft's original repository. So how did the attacker manage to publish on the project's behalf? Wiz maintains that the attacker appears to have compromised a client certificate and its private key from Microsoft's ESRP service, although it does not know how they were obtained. Other technical analyses do not establish the vector, the account used or who is behind it. Wiz adds a curious detail: the attacker's tool identified itself as Cairn, an AI-powered penetration testing framework.
For technical teams, these are the checks the researchers recommend:
- Look for versions 1.26.1 and 1.26.2. The last clean version is 1.26.0, and an unpinned installation resolved to 1.26.2, according to Wiz and Endor Labs.
- Check the site-packages folder for the two files left by the attack: agent_framework_meta.pth (from 1.26.1) and af_runtime_diag.pth (from 1.26.2). Wiz warns that searching only for the first one will not detect the second version.
- Rotate secrets: environment variables, Azure CLI sessions, and Azure DevOps, npm, PyPI, NuGet, Docker, Hugging Face and git tokens, as Wiz recommends.
- Review proxy and DNS logs for connections to webhook.site, the destination of the stolen data according to Wiz, which also warns that some stolen tokens may remain valid for up to 24 hours.
- If a malicious version was installed, isolate the machine, do not run Python or pip, and rebuild from scratch with 1.26.0. According to BleepingComputer and eSecurity Planet, uninstalling the package is not enough.
The other warning: AI that attacks without humans
One day earlier, on November 16, the Google Threat Intelligence Group (GTIG) and Mandiant published a report with an unprecedented finding: for the first time, they observed from start to finish attackers using a multi-agent system based on language models, called exploit_agent, capable of finding and exploiting security flaws without a person intervening. None of the sources reviewed links this report to the PyPI case; they coincide in timing, not in authorship.
Some coverage, including Expansión's, summarized that zero-day attacks (those that exploit flaws that are still unpatched) doubled in 2026. According to ShiftDelete.net, the report's figures are different: an average of 8 per month in 2025 versus 11 in 2026, with a peak of 22 in August. What nearly doubled was the total number of disclosures and exploits. XenoSpectrum also notes that the report provides no direct evidence that AI explains that increase.
Something similar happens with PaperCut, print management software widely used in offices and universities. Its flaws CVE-2026-81578 and CVE-2026-82078, when chained together, allow an attacker to take control of a server without a password, and the U.S. agency CISA added them on August 31 to its catalog of actively exploited vulnerabilities. It has been repeated that an attacking AI created the code to exploit them in less than 24 hours, but according to Security Affairs it was researchers, including those at Huntress, who achieved this using language models. Even so, the lesson holds: the time between a flaw becoming known and someone being able to exploit it is now measured in hours.
SonicWall and Arctic Wolf indicate that the flaws affect versions prior to 24.1.10, 25.0.13 and 26.0.5. Anyone using version 23 or earlier should migrate to a supported version, and the initial emergency patches do not fully protect against them. Arctic Wolf recommends closing TCP ports 9191 and 9192 to external traffic.
The report also describes so-called LLMjacking, the theft of cloud credentials to use paid AI models at other people's expense. According to Security Affairs, the attackers obtained keys exposed in public GitHub repositories and on fake sites that steal sessions, with fraudulent charges of more than $100,000 in a single day and, in the worst case, of up to $1 million. The same outlet reports the use of a flaw in LiteLLM, CVE-2026-40217, that turns keys with limited permissions into administrator credentials.
The material reviewed shows no confirmed Latin American victims or advisories from national incident response teams; Expansión reports that the operator of exploit_agent was targeting French sites. But the risk to the region is concrete for any team that installed agent-framework without a pinned version on November 17 or 18, or that has PaperCut exposed to the internet. It remains unknown how many victims there were, whether the stolen credentials were actually used to access cloud environments, and whether Microsoft or PyPI will publish official guidance. In the meantime, pinning versions, reviewing environments and limiting AI and cloud keys are measures that should not be put off.
Sources: Wiz Blog · Endor Labs · SonicWall · Horizon3.ai · Arctic Wolf