Back to Blog
news7 min readBy GitWatchman Team

agent-framework on PyPI: Caught in Minutes, Installed Anyway

On November 17, two versions of agent-framework, the PyPI meta-package for Microsoft Agent Framework, carried a credential stealer. This was the real project, not a lookalike name, and according to Wiz the attacker appears to have used the service Microsoft itself uses to publish the package. Security vendors flagged the first upload within minutes, and the agent-framework PyPI compromise still reached real machines.

1. Two Wheels in 33 Minutes

The times below come from Endor Labs, Wiz and Elastic Security Labs, all in UTC. BleepingComputer reported that Microsoft had not answered its questions about the point of breach at publication time.

  • November 12, around 18:25: the legitimate 1.26.0 goes out as a wheel and a source distribution, together with agent-framework-core 1.26.0 and the sibling packages.
  • November 17, 20:35:20: 1.26.1 is uploaded, wheel only.
  • Within three minutes Endor Labs' scanner flags it; Elastic's monitor flags it at 20:41.
  • 21:08:39: 1.26.2 is uploaded, again wheel only, with the payload moved to new file names. Whoever published 1.26.1 still had publishing access half an hour later.
  • By 21:13: 1.26.1 is gone from the index and 1.26.2 is the latest release. Endor Labs says it is not established who removed 1.26.1.
  • Around 21:30: neither version is available on PyPI, according to Wiz.
  • November 18: GitHub publishes the malware advisory GHSA-764m-3ppc-5m73, naming 1.26.1 and 1.26.2 and saying 1.26.0 and earlier are not affected.

According to Wiz, the attacker appears to have held a client certificate and private key for ESRP, the internal service Microsoft uses to sign and publish this package. The first upload attempt came from AWS and was rejected by ESRP's IP filtering; the second came from Microsoft-owned IP space and went through. Wiz says how the credentials were obtained is not yet known.

The package sees about 190,000 downloads a month, per Endor Labs. The attacker sent stolen data to a free webhook.site URL, and Wiz could read part of its log. It captured 50 requests, and 17 of them came from three victims whose data was sent successfully; the rest were the attacker's own tests, sandboxes and vendor scanning. Wiz also notes that the free tier accepts at most 100 requests per URL and then stops logging, so our reading is that three is a minimum, not a total.

2. A Valid Publisher Does Not Make a Normal Release

Our reading: once an attacker can publish through the vendor's own release pipeline, a check that asks "is this the official publisher?" answers yes, and the most useful signal left is whether the new release looks like the project's previous ones. 1.26.1 did not. Every agent-framework release Endor Labs examined from 1.21.0 to 1.26.0 shipped a wheel and an sdist (the source archive), and in 1.25.0 and 1.26.0 the meta-package went out together with agent-framework-core. The two malicious versions were wheel-only and arrived with no matching release of any sibling package.

The strongest objection is that this signal is noisy and cheap to fake. Noisy, because legitimate projects break their own pattern: on PyPI, agent-framework-core 1.5.0 has a wheel and no sdist, and nothing suggests it was malicious. Cheap to fake, because building an sdist takes one more command, and an attacker who knows about this check can add it. A shape check justifies holding an upgrade for a human look, and it may stop working once attackers adapt.

3. Four Things the agent-framework Releases Gave Away

1. The version number was a patch bump with nothing behind it. 1.26.1 changed no Agent Framework code, per Endor Labs; it added a .pth startup hook and a collector, and edited the meta-package's own __init__.py to call them. A meta-package patch can legitimately change a pin or some metadata, but this one shipped nothing a user would have asked for.

2. Fast detection still left a window. Three minutes to a scanner verdict is fast, yet the three victims in Wiz's data installed a bad version anyway: a verdict has to turn into a removal from the index before a plain pip install agent-framework stops picking it up. Elastic's response steps include adding a delay before adopting newly published packages, an idea we looked at after the LiteLLM incident in our piece on dependency cooldowns.

3. The second upload was built to survive a diff. In 1.26.2 the package's own __init__.py is byte-identical to the one in 1.26.0, and the payload moved to a new top-level module. A check that compares the package's modules with the previous release would pass it. A check that lists every file in the wheel would not.

4. The framework underneath stayed clean. Both versions pinned agent-framework-core[all]==1.26.0, so an upgrade pulled in the same core code as the clean 1.26.0 release, and nothing about the framework itself changed to tip anyone off.

Checking Release Shape Yourself

The script below reads PyPI's JSON API and prints, for the last six versions, when the first file was uploaded and which kinds of distribution were published. We ran it with Python 3.11 on November 19.

import json, sys, urllib.request

pkg = sys.argv[1]
with urllib.request.urlopen(f"https://pypi.org/pypi/{pkg}/json") as r:
    data = json.load(r)

rows = []
for version, files in data["releases"].items():
    if files:
        first = min(f["upload_time_iso_8601"] for f in files)
        rows.append((first, version, sorted({f["packagetype"] for f in files})))

for first, version, kinds in sorted(rows)[-6:]:
    flag = "" if "sdist" in kinds else "  <- no sdist"
    print(f"{version:10} {first[:16]}  {', '.join(kinds)}{flag}")
$ python3 release_files.py agent-framework
1.21.0     2026-10-08T10:39  bdist_wheel, sdist
1.22.0     2026-10-15T09:54  bdist_wheel, sdist
1.23.0     2026-10-22T17:01  bdist_wheel, sdist
1.24.0     2026-10-30T21:37  bdist_wheel, sdist
1.25.0     2026-11-07T15:41  bdist_wheel, sdist
1.26.0     2026-11-12T18:24  bdist_wheel, sdist

Today the output ends at 1.26.0, because the two bad versions were removed. Going by the file lists Endor Labs published, run during the window it would have printed both as wheel-only. Two limits apply: the PyPI docs mark the releases key as deprecated in favor of the Index API, and a missing sdist is common enough in other projects that it is a prompt to look, not a verdict.

Why installing was enough: the site module documentation says import lines in .pth files are deprecated as of Python 3.15 and will be silently ignored in 3.18 and 3.19. Until then they run on every interpreter start, so importing either version was never needed.

4. Who Compares a PyPI Upload With the Project's Releases?

agent-framework's PyPI metadata points its release notes to GitHub Releases. For a project like that, the obvious cross-check is: does the version my resolver just picked have a release on GitHub? We could not run that check for 1.26.1. On November 19 the microsoft/agent-framework repository on GitHub returned a 404 to us, and none of the analyses we read says whether a matching tag existed.

Registries could refuse or hold uploads that break a project's own history, such as a missing sdist, a lone meta-package, or a new top-level module, at the cost of blocking the occasional legitimate odd release. Resolvers could do it on the consumer side. Or the job stays with people, who would need to know what the project announced in the first place. That last part is the narrow piece GitWatchman covers, with limits. It checks every 2 hours and reports the release GitHub marks as Latest, so in a repository that ships several products that release may not be the package you install. agent-framework's own release-notes link filters GitHub Releases to tags starting with python-1, a hint that its Python releases share the page with others. It watches GitHub only, so it would not have seen these PyPI uploads, and its view of a project is its Releases page, not its tags. Comparing that list with your lockfile is still a manual step.

Frequently Asked Questions

Which agent-framework versions were malicious?

1.26.1 and 1.26.2, both uploaded to PyPI on November 17, 2026. GitHub's malware advisory GHSA-764m-3ppc-5m73 lists only those two and says 1.26.0 and earlier are not affected. Both versions were removed from PyPI the same evening. If either one was installed anywhere, the advisory says to treat that environment as exposed and rotate the credentials it could reach.

Was I affected if my code never imported agent_framework?

Yes, if the package was installed. Both versions shipped a .pth file, and Python runs import lines in .pth files every time the interpreter starts. Endor Labs notes that this includes pip itself. Installing 1.26.1 or 1.26.2 into an environment was enough; any later Python process in that environment ran the stealer.

Was agent-framework-core compromised too?

No. Endor Labs checked 22 sibling agent-framework-* packages, including agent-framework-core, and none had a release after November 12. The malicious meta-package versions pinned agent-framework-core[all]==1.26.0, so the framework code itself was the clean 1.26.0.

Would a GitHub release notification have warned me?

Not directly. GitWatchman watches GitHub Releases, and this attack happened on PyPI. GitWatchman also checks every 2 hours, while the bad versions were gone within about an hour. What a release feed gives you is the project's own list of announced versions, to compare against what your resolver installed.

Know what your dependencies announced on GitHub

While the beta has room, follow up to 5 public GitHub repositories for free. GitWatchman sends new releases by email, Slack, Discord or Telegram, or to your personal RSS feed.

Start tracking for free