Microsoft agent-framework PyPI hijack: inside the stealer and the repos that command AI agents
A malicious package was uploaded to the Python Package Index, and a second version with the same stealer followed shortly after the first was removed.
Overview
On November 17, 2026, a malicious version of the Microsoft agent-framework package was uploaded to the Python Package Index. This package is a metapackage that pulls in the core framework used to build AI agentsArtificial intelligence software that can plan steps, call tools, and take actions on its own and receives around 192,000 downloads a month. The malicious release included a credential stealerMalware built to quietly copy saved passwords, browser cookies, and wallet keys from an infected device but kept the genuine dependenciesAn external code library or package that a software project relies on to do part of its work so that the software appeared to work normally. SafeDep detected the first release 22 minutes after it was published and the second release four minutes after it appeared. Both malicious versions were quarantined within roughly an hour of the first upload. The gap between the upload and detection means it is unknown how many users installed the malicious versions during their short life.
Terms in this story
- AI agents
- Artificial intelligence software that can plan steps, call tools, and take actions on its own. Many stories cover agentic AI when companies connect language models to email, browsers, and databases, creating new risks if a hidden prompt tricks the agent into leaking data.
- credential stealer
- Malware built to quietly copy saved passwords, browser cookies, and wallet keys from an infected device. Victims often download an infostealer through a fake game crack or malicious ad, and the stolen login cookies are then sold to ransomware crews on criminal markets. Security+ objective 2.4 lists the term
- tokens
- A short-lived digital pass that a server gives a logged-in user or app. After you sign in once, your browser or app presents a token on each request, and if malware steals that token the attacker can act as you without knowing your password. Security+ objective 4.6 lists the term
- IOCs
- Forensic clues, such as malicious file hashes, domain names, or IP addresses, that show an intrusion happened. At the end of a breach report, researchers publish indicators of compromise so other defenders can search their own logs for those exact domains and file fingerprints.
- open-source
- Software whose source code is publicly available for anyone to inspect, use, modify, and share. Most websites and apps rely on hundreds of open-source code libraries, so a single security flaw or malicious update in a popular library can affect thousands of companies at once.
- registry
- A central database of system settings on a computer or a public catalog that hosts software packages. In security news, the registry means either the operating system settings database where malware adds startup entries or a public package registry where developers download code libraries.
- configuration files
- A text file that stores settings, network addresses, and options for how a program or server runs. Attackers who gain read access to a server look for its configuration file first because it often contains database passwords, API keys, and internal server paths.
- payload
- The part of an attack or malware file that carries out the harmful action on the target. A phishing email and an exploit are only the delivery steps, while the payload is the ransomware or spyware that actually runs once the computer is compromised.
- permissions
- The specific rights granted to an account or app to read, write, or run files and services. When a mobile app or browser extension asks for broad permissions, such as reading every web page you visit, a malicious update can abuse those rights to steal passwords.
- repository
- A central storage place where a software project's source code, change history, and configuration files are kept. Software teams collaborate by pushing code to a shared repository, and attackers scan public repositories for accidentally committed API keys or try to poison popular projects.
- dependency
- An external code library or package that a software project relies on to do part of its work. When a popular open-source dependency has a security bug or gets hijacked by an attacker, every application that imports that package inherits the risk.
- bytes
- A group of 8 bits, enough to store 1 character. Memory sizes, network payloads, and buffer lengths are measured in bytes, and memory corruption bugs happen when a program writes even a single byte past the end of its buffer. From the CYBR 101 room CYBR 101: Ciphers and encryption (part 1)
This page is a short description made for this site. The article itself, with its author's name and its own link, is on the The CyberSec Guru website. Cite the article, not this page.
Read the full article on The CyberSec Guru (opens in a new tab)
Course connections
Each line below connects this story to a Security+ objective (a skill on CompTIA's Security+ exam, a common first cybersecurity certification), a CYBR 101 week, or a cybersecurity job, and quotes the words that made the connection.
- Kind of story: Research and reports
"Bitdefender Labs published research on a separate campaign..." Found by reading the article; these exact words are in it - Who is affected: "AI coding assistants such as Claude Code and Cursor..."
Copied word for word from the article - Security+ 2.2 Explain common threat vectors and attack surfaces.
"Microsoft agent-framework PyPI hijack: inside the stealer and the repos..." Found in the headline - Security+ 2.4 Given a scenario, analyze indicators of malicious activity.
"Microsoft agent-framework PyPI hijack: inside the stealer and the repos that command AI agents..." Found in the headline - Security+ 4.6 Given a scenario, implement and maintain identity and access management.
"Microsoft's agent-framework PyPI hijack ran a .pth credential stealer that minted Azure and GitHub tokens...." Found in the opening sentences - CYBR 101 week 6: AI, how it is attacked, and what it does for attackers and defenders
"......the stealer and the repos that command AI agents..." Found in the headline - CYBR 101 week 9: malware, indicators and how detection works
"Microsoft agent-framework PyPI hijack: inside the stealer and the repos that command AI agents..." Found in the headline - Job skill (from the U.S. Department of Defense list of cybersecurity jobs): Measure the effectiveness, security, robustness, and trustworthiness of AI tools.
"...built to make AI coding assistants..." Found by reading the article; these exact words are in it - Job skill (from the U.S. Department of Defense list of cybersecurity jobs): Skill in analyzing malware.
"...safedeps automated analysis caught the first release..." Found by reading the article; these exact words are in it
How a story is connected to the course, and every objective, week and job role
Same story at other outlets
- Credential stealer slipped into Microsoft’s official Python agent framework
- Microsoft’s Agent Framework PyPI package compromised to steal credentials
- Attackers hijack Microsoft’s agent-framework package to steal Azure and CI credentials
- Attackers Compromise Microsoft's Agent Framework PyPI Package to Steal Cloud Credentials
- Microsoft’s AI Agent Framework Package Compromised on PyPI to Steal Cloud Credentials
- Microsoft’s Agent Framework PyPI Package Hacked to Steal Azure and GitHub Credentials
- Two malicious agent-framework releases hit PyPI in 33 minutes