Skip to content
NewCybercrime Report 2026 · Eight Chapters · A Post Is Not An Incident → Explore The ChaptersCybercrime Report 2026 → Explore
Security NewsNews Explainer

Inside the agent-framework PyPI Credential Stealer Releases

The agent-framework PyPI compromise placed credential collectors in versions 1.26.1 and 1.26.2. Trace Python execution, cloud tokens, and response steps.

By
Brandefense Research Team
Reviewed by
Brandefense Analyst Team
Published
18 November 2026
Reading time
7 min read
A package entering a guarded Python runtime beside cloud identity layers

The agent-framework PyPI compromise affects releases 1.26.1 and 1.26.2, according to Socket’s November 17, 2026 research. The changed packages place a credential collector in Python’s startup path. Teams that installed either release should identify every environment that started Python with it, remove the release, and assess exposed secrets.

Socket describes collection from local credentials, process environments, and cloud identity services. Its report does not establish how many users installed the releases or whether any particular organization lost data. The immediate decision is therefore about confirmed package use and the credentials reachable from each affected runtime.

How Did the agent-framework PyPI Compromise Cross the Trust Boundary?

A dependency can arrive through a direct install, a pinned build, or a transitively updated environment. Put supplier exposure into a third-party risk management platform review, then use package records to establish where the releases ran. In this case, Socket found startup hooks inside two published PyPI releases. Python processes can invoke such hooks during interpreter startup, before an application intentionally uses the framework.

That placement matters because a normal application import is not required to explain the collector’s opportunity. A service, development shell, or build worker that starts Python with the affected environment can provide a launch point. Treat the reach of the installed interpreter as the exposure boundary, then trace what that interpreter could read.

Reported credential path
Reported credential pathAttack path in 5 steps: 1, Affected PyPI release (Package), then installed into Python environment; 2, Startup hook (Runtime), then runs when Python starts; 3, Secret collector (Runtime), then reads reachable credentials; 4, Cloud identity request (Identity), then requests available tokens; 5, External collection (External).PackageRuntimeIdentityExternalinstalled into Python…runs when Python startsreads reachable…requests available tokensAffectedPyPI releaseStartup hookSecretcollectorCloudidentity…Externalcollection
  1. Affected PyPI releasePackageinstalled into Python environment
  2. Startup hookRuntimeruns when Python starts
  3. Secret collectorRuntimereads reachable credentials
  4. Cloud identity requestIdentityrequests available tokens
  5. External collectionExternal

The diagram summarizes Socket’s reported code behavior, not a confirmed path through any reader’s systems. It separates package presence from runtime execution and reachable credentials. Those are three different questions, and each needs its own evidence before incident scope is declared.

What Changed Between Releases 1.26.1 and 1.26.2?

Socket says version 1.26.1 uses a Python startup hook that enters the package initializer before starting a separate collector. That collector runs asynchronously and suppresses visible errors. The pattern lets normal application activity continue while secret collection happens in the background.

In version 1.26.2, the startup hook points to a relocated top-level collector. Socket says the legitimate package initializer was restored to its original content. A review limited to the first release’s changed initializer could therefore miss the second release’s malicious behavior.

The version difference affects hunting and triage. Review package records and the full distribution with trusted tools outside the affected Python environment. Do not clear an environment solely because its initializer looks normal.

StepSecurity found that 1.26.2 was uploaded 2 minutes 23 seconds after PyPI quarantined 1.26.1. Both releases were later quarantined. The first quarantine did not immediately end publishing access; it does not show whether that access persists.

Socket also describes broader GitHub Actions targeting in 1.26.2. The later collector can request OIDC tokens when the runner exposes the relevant workflow identity context. That makes build and deployment workers especially important during scope review, even when the application workload holds few long-lived secrets.

Which Credentials Could an Affected Runtime Reach?

Both collectors search environment variables for secret-like names and read common credential and configuration stores, according to Socket. The research also describes inspection of other processes’ environments where the runtime can access them. This breadth means a package installed for one application may encounter credentials belonging to another process or workflow on the same host.

Socket reports active requests for Azure managed-identity and Azure DevOps federation tokens. These are different from simply copying a credential already present in a variable. The practical review must include both stored secrets and identity tokens that the affected runtime was permitted to obtain.

For 1.26.2, Socket adds GitHub Actions OIDC token requests and runner-specific credential collection. The exposure of any given runner still depends on its permissions, workflow context, and whether the affected interpreter ran. Review those conditions before deciding which identities and downstream resources need action.

Socket observed the gathered data serialized, compressed, encoded, and sent to an external collection endpoint. Encoding does not make the data harmless, and it does not itself prove a recipient obtained useful credentials. Socket says the reported collectors did not fetch or run an additional payload, so this analysis focuses on credential access and exfiltration.

The report describes a malicious published package, not the route by which the releases entered PyPI. It does not prove a breach of Microsoft’s own systems. Keep the compromise of distributed artifacts separate from any claim about the publisher’s internal infrastructure.

How Should Teams Decide Whether They Are Exposed?

Start with lockfiles, package records, build logs, and deployment manifests for the exact two versions. Use trusted tools outside an affected Python environment for initial inspection; starting Python or pip there can run the startup hook again. Record the environment, installation time, first Python startup after installation, and the identity under which it ran. A package download alone is weaker evidence than an install followed by interpreter execution.

Next, map each affected runtime to reachable secrets and identity services. Separate local developer credentials, build worker credentials, cloud managed identities, and workflow federation rights. This mapping determines which rotations or revocations have priority and prevents a broad but ineffective reset campaign.

Socket’s described collection points suggest reviewing process start telemetry and unexpected outbound requests from affected Python environments. Inspect cloud identity token issuance, workflow federation, and privileged resource access during the suspected interval. An absence of obvious outbound alerts is not enough to clear an environment with confirmed execution.

The malicious package entry explains why package provenance and runtime behavior both matter. That context supports scope work; it does not establish that any particular organization was affected.

Brandefense Blackhole counted 69 dark-chat posts matching the broad phrase “agent-framework” from August 20 through November 18, 2026. The measured unit is matching posts, not unique actors or victims. Much of that period predates Socket’s report, so the count cannot be treated as 69 discussions of this incident or evidence of exploitation.

What Should the Response Sequence Look Like?

First, stop new installs of 1.26.1 and 1.26.2 in dependency policy and build configuration. Isolate affected environments before starting Python or pip there. Rebuild from a known-clean base; StepSecurity identifies 1.26.0 as the last clean release. Verify the replacement artifact and running environment after redeployment rather than relying only on a changed manifest.

Second, preserve package records, build logs, process history, and relevant identity activity before cleanup removes context. Record the earliest credible execution window for each environment. The window anchors token review and helps responders distinguish a development laptop from a production runner.

Third, rotate or revoke credentials that an affected runtime could access, prioritizing high-privilege Azure identities, Azure DevOps credentials, and CI secrets. For GitHub Actions on 1.26.2, review OIDC federation permissions and token issuance as well. Short-lived tokens still warrant review of the rights they could exercise while valid.

Fourth, investigate downstream activity under those identities and compare it with expected jobs. Look for unusual resource access, token exchanges, or changes to deployment configuration during the exposure window. Escalate when identity use or network records indicate collection rather than assuming every installation caused confirmed loss.

Finally, document the package version, interpreter execution evidence, accessible secrets, response actions, and remaining uncertainty. Revisit the assessment if the researcher or package maintainer publishes new evidence. The incident response plan template can structure that record across owners.

What Can the Source Establish Today?

Socket’s analysis supports a narrow, actionable conclusion: two agent-framework PyPI releases carried startup-triggered credential collection code. It details the different paths in each version and the classes of secrets and tokens targeted. That is enough to justify containment and credential review where the releases were used.

Socket’s report does not name a clean replacement release; StepSecurity identifies 1.26.0 as the last clean version. Neither analysis provides an installation count, verified victim list, or successful exfiltration count. Do not infer those outcomes from package popularity or discussion counts. For each environment, determine whether the affected package ran and what it could access at that time.

Frequently Asked Questions

Does installing agent-framework 1.26.1 or 1.26.2 prove credential theft?

Installation identifies an affected environment, but the incident scope depends on interpreter execution and reachable credentials. Socket does not provide a victim-specific loss count.

Why does checking only the package initializer miss version 1.26.2?

Socket says the later release restored that initializer and moved the collector behind another startup hook. Review the full installed distribution and its version.

Which identities deserve first review after a confirmed run?

Prioritize reachable Azure identities, Azure DevOps federation, CI secrets, and GitHub Actions OIDC rights for version 1.26.2. Review activity as well as rotating credentials.

Sources

  1. StepSecurity, Microsoft Agent Framework PyPI Package Compromised, November 18, 2026
  2. Socket Research Team, agent-framework PyPI package compromise, November 17, 2026
Share this articleLinkedInXEmail
Brandefense logo

Stay Ahead of Digital Threats.

Take control of your digital security with an exclusive demo of our AI-driven threat intelligence platform.

Open The Full Demo Form →