← Lab /Security & privacy

Compromised agent-framework PyPI packages exfiltrated Azure, DevOps and GitHub tokens within minutes

Versions 1.26.1 and 1.26.2 of the agent-framework PyPI package stole Azure, Azure DevOps, and GitHub Actions tokens from any host where they were installed.

Security & privacy Elastic Security Labs 18 Nov 2026 Disclosure Real-world evidence

Published as “We caught the agent-framework PyPI compromise six minutes after it published”

Why it matters

Supply-chain attacks can compromise cloud credentials across many hosts, highlighting the need for stricter package vetting and rapid detection.

Summary

The researchers observed two malicious releases of the agent-framework meta-package on PyPI that added a .pth startup hook executing a credential stealer on every Python launch. The stealer harvested environment variables, process memory, CLI token caches, and cloud OIDC tokens, then posted the data to a webhook.site endpoint. Detection by a supply-chain monitor occurred six minutes after the first version was published, and both packages were removed within an hour.

What they found 2

  1. Versions 1.26.1 and 1.26.2 stole Azure, Azure DevOps and GitHub Actions tokens via a .pth hook.

    “Versions 1.26.1 and 1.26.2 stole Azure, Azure DevOps and GitHub Actions tokens from a .pth hook that ran on every Python launch, so if either one touched a build agent or a laptop, assume every secret on that host is gone.”

  2. The supply-chain monitor flagged the malicious package six minutes after publication.

    “agent-framework 1.26.1 went live on PyPI at 20:35 UTC on November 17, 2026. Our supply-chain monitor flagged it as malicious at 20:41 UTC, and we published the details that evening.”

Caveats 2

  • It is unclear whether the OIDC requests return a token that matches any federated credential.
  • If the stealer runs inside an Azure DevOps pipeline, it is unclear whether these requests return a token that matches any federated credential.

What’s new here 4

  • Uses a .pth startup hook to run malicious code before any user script.
  • Collects a wide range of cloud and CI/CD tokens, including Azure, Azure DevOps, and GitHub Actions OIDC tokens.
  • Exfiltrates compressed, Base64-encoded data to a single webhook.site URL.
  • Version 1.26.2 adds a GitHub Actions token collector.

In the news