Credential stealer slipped into Microsoft’s official Python agent framework
Malicious code in two releases of Microsoft's official Python agent framework stole cloud and CI/CD credentials from developers' systems.
Overview
Microsoft released two versions of its official Python agent framework that contained hidden code designed to steal credentialsThe login details, such as a username and password or key, that prove who an account belongs to. This malicious code ran automatically when the software started, allowing it to collect sensitive data from developers' systems without them knowing. The package had 192,534 monthly downloads, meaning many people likely installed the compromised versions. The attackers gathered environment variablesA named setting stored in a program's running environment that often holds file paths or secret keys, configuration files, and requested new access tokensA short-lived digital pass that a server gives a logged-in user or app from cloud services. They then sent this stolen information to a remote server in a single request. PyPI has now quarantined the bad releases, but the attacker proved they still had access by uploading a second version after the first was blocked.
Terms in this story
- credentials
- The login details, such as a username and password or key, that prove who an account belongs to. Many breaches begin when attackers steal an employee's login credentials through a fake website and sign in to the company network as if they belonged there. Security+ objective 4.6 lists the term
- environment variables
- A named setting stored in a program's running environment that often holds file paths or secret keys. Cloud apps frequently store database passwords and API tokens in environment variables, so an attacker who tricks a server into printing its environment variables can steal those secrets.
- access 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
- 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
- CI/CD
- The automated pipeline that tests, builds, and deploys software whenever developers push new code. Attackers love to compromise a company's CI/CD pipeline because that build server holds cloud keys and can inject malicious code directly into official software releases. Security+ objective 4.7 lists the term
- 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.
- 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.
- supply chain security
- All the open-source libraries, build tools, code repositories, and update servers that go into making a program. Protecting the software supply chain means making sure no attacker has tampered with the third-party packages, build pipelines, or signing keys used to ship an application.
- credential-stealing
- Stealing usernames, passwords, login tokens, or keys so an attacker can sign in as a real user. Attackers use phishing pages, keyloggers, and memory dumps for credential theft because logging in with a real employee's password triggers fewer alarms than a noisy software exploit. Security+ objective 2.4 lists the term
- 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.
- 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.
- runtime
- The environment in which a program executes, or the period of time while the program is actively running. A flaw in a container or language runtime can let a program escape its isolation, and runtime security tools watch what a program actually does in memory while it runs.
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 Help Net Security website. Cite the article, not this page.
Read the full article on Help Net Security (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: Breach or attack
"...carried code that steals cloud and CI/CD credentials..." Found by reading the article; these exact words are in it - Security+ 2.2 Explain common threat vectors and attack surfaces.
"......package on the Python Package Index (PyPI) carried code that steals cloud and..." Found in the opening sentences - Security+ 2.4 Given a scenario, analyze indicators of malicious activity.
"Credential stealer slipped into Microsoft’s official Python agent framework..." Found in the headline - Security+ 4.6 Given a scenario, implement and maintain identity and access management.
"Credential stealer slipped into Microsoft’s official Python agent..." Found in the headline - Security+ 4.7 Explain the importance of automation and orchestration related to secure operations.
"......(PyPI) carried code that steals cloud and CI/CD credentials from developers' systems. Agent Framework is..." Found in the opening sentences - CYBR 101 week 1: the course, logins and two-factor sign in, cyber roles and jobs
"......from developers' systems. Agent Framework is Microsoft's open-source toolkit for building AI agents and running..." Found in the opening sentences - CYBR 101 week 6: AI, how it is attacked, and what it does for attackers and defenders
"......Framework is Microsoft's open-source toolkit for building AI agents and running them in workflows." Found in the opening sentences - CYBR 101 week 9: malware, indicators and how detection works
"Credential stealer slipped into Microsoft’s official Python agent framework..." Found in the headline - Job skill (from the U.S. Department of Defense list of cybersecurity jobs): Knowledge of malware triage.
"...carried code that steals cloud and CI/CD credentials..." Found by reading the article; these exact words are in it - Job skill (from the U.S. Department of Defense list of cybersecurity jobs): Knowledge of threats to OPSEC when installing, using, modifying, and uninstalling tools.
"...two releases of microsofts official agent-framework package..." 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
- Microsoft’s Agent Framework PyPI package compromised to steal credentials
- Attackers hijack Microsoft’s agent-framework package to steal Azure and CI credentials
- Microsoft agent-framework PyPI hijack: inside the stealer and the repos that command AI agents
- 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