Skip to content
Back to blog

Agent Framework on PyPI: Test Startup Hooks and Cloud Identity Reach

4 min read
Agent Framework on PyPI: Test Startup Hooks and Cloud Identity Reach

Sources checked: . FailSafe Research.

Malicious versions 1.26.1 and 1.26.2 of the legitimate agent-framework package appeared on PyPI on 17 November 2026. According to the GitHub advisory, they used Python startup hooks to steal environment variables, cloud credentials, CI/CD tokens, credential files and managed-identity tokens. Both versions were removed, and users were advised to revert to 1.26.0 and rotate exposed credentials.

Agent frameworks are a high-value target because of where they run. They are often installed on developer workstations, in CI runners and in privileged cloud environments. A compromised package can inherit more authority than the agent itself was designed to use.

What was reported

  • Two malicious releases of a legitimate package, published on PyPI.
  • Execution through Python startup hooks rather than an obvious application entry point.
  • Collection of environment variables, cloud credentials, CI/CD tokens, credential files and managed-identity tokens.
  • Removal of the affected versions and guidance to revert to 1.26.0 and rotate credentials.

The advisory is the source for these points. FailSafe did not analyze the package, and this article publishes no code or reproduction steps.

Why startup hooks are hard to see

A startup hook runs when the interpreter starts, before the application logic a reviewer might inspect. That makes a package review based only on the declared entry point incomplete. It also means a dependency can execute in contexts the developer never intended, including build steps, notebooks and test runners.

The security question is not only whether the package is malicious. It is what authority the package can reach in each environment where it is installed.

What to check now

  1. Version inventory. Confirm which environments installed 1.26.1 or 1.26.2, including developer machines, CI images, containers and notebooks.
  2. Credential rotation. Treat any secret available to those environments as exposed. Prioritize cloud keys, CI tokens and managed-identity paths, then credential files and environment variables.
  3. Build provenance. Check whether the package came from the public index, an internal mirror or a vendored copy. A mirror can lag or cache a removed version.
  4. Dependency pinning. Confirm that installs are pinned and that a lockfile or hash check would have rejected the new release.
  5. Workload identity reach. Determine what the CI job or workload could do with the identity it held, not only what the agent was supposed to do.
  6. Telemetry. Look for outbound connections, token use from unexpected locations and changes to cloud resources during the exposure window.

Test the build chain, not only the runtime

An AI-system assessment that covers prompts, tools and retrieval but ignores the build chain misses a path with higher authority. Add these questions to the scope:

  • Which package sources are allowed, and who can publish to an internal mirror?
  • Are installs pinned with hashes, and does CI fail on an unexpected version?
  • Which identities are available during build, test and deployment, and are they separated?
  • Can a dependency read credential files or metadata endpoints from the build environment?
  • Are canary credentials seeded in non-production environments to detect use?
  • Does the agent have a component inventory that includes transitive Python packages?

The model supply chain guide covers checkpoints and fine-tuning data. The LiteLLM PyPI compromise analysis covers a separate package incident, and the local MCP package review covers tool packages.

What this does not establish

The advisory does not establish who published the releases or how many environments installed them. A clean package scan after removal does not show that credentials were not used during the exposure window. Rotate and review logs rather than relying on the package's absence.

Where FailSafe fits

FailSafe tests authorized applications, APIs and the infrastructure around them. A scoped assessment can review dependency provenance, workload identity reach, build secrets and agent supply-chain controls alongside runtime behavior. The AI and LLM testing scope covers the application boundary, and the sovereign deployment page covers keeping build and assessment data inside an approved environment.

Source status

This analysis follows the GitHub advisory for the agent-framework package as summarized in FailSafe's 23 November research review. FailSafe could not retrieve the advisory while preparing this article. Confirm the affected versions, removal status and rotation guidance with the current advisory.

Questions & answers

Questions about this topic

Direct answers to common questions about this page.

The advisory identified 1.26.1 and 1.26.2 as malicious and advised reverting to 1.26.0. Confirm the current advisory for any later updates.

The advisory described collection of environment variables, cloud credentials, CI/CD tokens, credential files and managed-identity tokens through Python startup hooks.

No. Rotate any credential that was available to an affected environment and review cloud and CI logs for use during the exposure window.

It often runs on developer workstations, in CI runners and in cloud environments with deployment or identity permissions. Those permissions can exceed what the agent needs at runtime.

Put this guidance to work

Bring the package sources, CI identities and agent deployment. FailSafe can assess the build and runtime boundary within an agreed scope.

Startup offer: $999 USD for 250 credits and one authorized black-box run. Sign in to SWARM before Stripe checkout. Custom scope and sovereign deployments are separate.

Review your agent build chain