PyPI Quarantines Two Microsoft AI Framework Releases Found Stealing Credentials

PyPI Quarantines Two Microsoft AI Framework Releases Found Stealing Credentials

PyPI, the main package store for the Python programming language, has quarantined two releases of Microsoft's toolkit for building AI agents after security researchers found code that steals credentials. The affected versions are agent-framework 1.26.1 and 1.26.2. PyPI's pages for both releases now tell users to install version 1.26.0 instead.

Quarantine means the releases are blocked from normal installation through PyPI's index, and maintainers cannot change them while a security review is pending.

Key points

  • Researchers at Wiz and OX Security reported credential-stealing code in agent-framework 1.26.1 and 1.26.2.
  • Both versions were uploaded to PyPI on Nov. 17 and were blocked from normal installation by about 4:30 p.m. ET the same day, according to Wiz's timeline.
  • The malicious code could run when Python started, even if an application never imported the package.
  • PyPI suggests using version 1.26.0 instead.
  • How the attackers obtained publishing access remains unconfirmed.

What Wiz and OX Security found

According to Wiz, version 1.26.1 was uploaded at 3:35 p.m. ET on Nov. 17, and version 1.26.2 followed at about 4:08 p.m. ET. Both were unavailable for normal installation by about 4:30 p.m. ET.

Wiz's analysis says installing either release placed a startup file in site-packages, the directory where Python keeps installed packages. Python's documentation says such startup lines run regardless of whether the related module is used, so the stealing code could launch the next time Python started in that environment. Python's -S option disables this processing. OX Security noted the package still pulled in the genuine framework core, so applications could keep working normally, which could hide the problem.

The code, as described by Wiz, collected secret-looking environment variables, .env files, Azure CLI credentials, git credentials, Docker configuration and Hugging Face tokens. It also tried to obtain Azure managed-identity tokens and Azure DevOps pipeline identity tokens where the needed endpoints and credentials were available. The gathered data was compressed and sent to an attacker-controlled webhook.site endpoint.

The second release added new tricks

Version 1.26.2 added attempts to obtain GitHub Actions OpenID Connect tokens in workflows that grant id-token write permission, Wiz said. Those tokens can be exchanged for Azure access where an Entra ID federated credential trusts the workflow. That means the attack did not rely only on finding stored passwords or API keys.

Wiz also warned that 1.26.2 used different startup filenames than 1.26.1. Version 1.26.1 used agent_framework_meta.pth and a payload file agent_framework_meta/_telemetry.py. Version 1.26.2 used af_runtime_diag.pth and af_runtime_diag.py in the site-packages root. Scanning only for the first release's files can miss the second.

Wiz said the attacker's free-tier collection endpoint captured at most 50 requests. Those requests could still contain working cloud, build-system and registry credentials.

What affected teams are advised to do

Wiz and OX Security recommend that affected teams:

  • Find and remove affected installations. Search lockfiles, build logs, virtual environments and container images for versions 1.26.1 or 1.26.2, and check for both sets of startup files. Remove the malicious releases and pin to 1.26.0. OX Security also recommends hash-checked installation.
  • Rotate exposed credentials. Wiz recommends rotating credentials on affected hosts and build runners. OX says that where the payload ran, teams should treat all reachable secrets as compromised, including cloud, source-control, model-provider and package-registry credentials.
  • Review identity use and outbound traffic. Check Azure sign-in and activity logs and the GitHub workflows exposed to 1.26.2. Wiz's report lists the collection endpoint for checking network logs. OX recommends blocking outbound traffic to webhook.site from build infrastructure.

What is confirmed and what is not

Confirmed by the researchers and PyPI's pages: the two releases are quarantined, PyPI points users to 1.26.0, and the researchers published timelines and payload details.

Still unconfirmed: how the attackers obtained publishing access. Wiz's report does not confirm this.

Why it matters

Anyone who installed these two versions on a developer machine or a continuous-integration build system could have exposed cloud, git, Docker, Hugging Face and other credentials, even without using the AI framework directly. Because the code ran at Python startup, the risk extended beyond applications that imported the package.

Sources

Newisty Editorial Team
Written by

Newisty Editorial Team

Technology · Crypto · Digital Economy
View all posts

Newisty Editorial Team covers technology, cryptocurrency, digital products, online platforms, developer tools and the wider digital economy. Our content is researched from official sources, company announcements, public documentation, market data and other primary or reputable sources. Articles are reviewed and edited before publication for clarity, accuracy and useful context.

Comments (0)

Leave a comment
Your comment will appear publicly after submission.
No comments yet. Be the first to comment!