News · GitHub Security Advisories / PyPI · 2 min read
Event date: · Published:
Malicious PyPI packages impersonate Microsoft's agent-framework to steal credentials
GitHub disclosed on November 18, 2026 that two fake agent-framework PyPI releases installed a startup hook that harvested Azure, AWS, GitHub and CI secrets and sent them to a remote server.
GitHub Security Advisories disclosed on November 18, 2026 that attackers had published two malicious versions of the agent-framework PyPI package, impersonating Microsoft's legitimate Agent Framework, to steal cloud and CI/CD credentials, according to GitHub Security Advisory GHSA-764m-3ppc-5m73, which rates the issue Critical malware with no CVE assigned.
What changed in the agent-framework package
- The advisory
GHSA-764m-3ppc-5m73, published November 18, 2026, rates the issue Critical malware with no CVE assigned. - Versions
1.26.1and1.26.2of theagent-frameworkpackage are malicious and impersonate Microsoft's legitimate Agent Framework. - The
1.26.1wheel was published November 17, 2026 at 20:35 UTC, followed by1.26.2at 21:08 UTC. - The payload installs through a
.pthstartup hook that runs on every Python interpreter launch, without the package ever being imported. - It harvests hostname, username, working directory, command-line arguments, and environment variables containing strings like TOKEN, SECRET, PASSWORD, KEY, AZURE, AWS, GITHUB, HF_, OPENAI, NPM, PIP and CI_.
- It also steals credential files from
~/.azure,.npmrc,.netrc,.git-credentialsand Docker config, scrapes/proc/*/environ, targets Azure and GitHub Actions OIDC tokens, and exfiltrates the data via HTTP POST to a command-and-control webhook.
What it means for people who build with AI
This is a supply-chain attack that impersonates a widely used Microsoft AI agent framework to steal cloud and CI/CD credentials, a direct risk for developers and pipelines that install AI agent dependencies from PyPI without pinning or verifying versions.
Remediation and availability
Both malicious versions have been removed from PyPI. Affected users should uninstall 1.26.1 and 1.26.2, rotate all exposed secrets and CI tokens, and reinstall the legitimate 1.26.0 release.
Sources
- Malicious code in agent-framework (PyPI) (GitHub, November 18, 2026, official)
Written with AI assistance, strictly from the sources listed above. Before it went live, automated checks verified its dates, sources and every language edition.