Two tampered releases of Microsoft's Agent Framework on PyPI stole cloud and CI credentials at Python startup

    · Microsoft · Agent Framework (Python)

    Data exposureHighAttack on agent toolsConfirmedIn the wild

    On November 17, an attacker published two tampered versions of Microsoft's open-source Agent Framework for Python to PyPI. They ran a credential stealer whenever Python started, sending cloud, CI and developer tokens to an outside server, until PyPI pulled them within about 40 minutes.

    What happened

    Versions 1.26.1 (20:35 UTC) and 1.26.2 (21:08 UTC) of `agent-framework`, Microsoft's toolkit for building AI agents, were uploaded to PyPI with a hidden startup hook. The code ran every time Python started, even if the framework was never imported. It collected secrets from environment variables and credential files (Azure, GitHub, npm, PyPI, Docker, Hugging Face, `.env`), requested fresh Azure and GitHub Actions tokens, and posted them to a webhook.site address. The second version was uploaded after the first had been quarantined. Wiz assesses that the attacker likely used a stolen certificate for Microsoft's internal release pipeline (ESRP); StepSecurity says the way in has not been established. Wiz also reports the attacker's tooling identified itself as Cairn, an open-source AI attack framework.

    Impact

    The package averages about 40,000 downloads a week; downloads of the two bad versions have not been reported. Wiz found three confirmed cases of stolen victim data in what the attacker's endpoint captured.

    Vendor response

    PyPI quarantined both versions. Microsoft has not published a statement we could verify; Wiz says it reported the findings to Microsoft on November 17. Researchers advise pinning 1.26.0, blocking 1.26.1 and 1.26.2, and rotating every secret on affected machines.

    Takeaway

    People, not an agent, did the harm here. The toolkits used to build agents are now targets themselves, because the machines that run them hold cloud and CI credentials.

    Sources

    1. Microsoft agent-framework Compromised: Credential Stealer Targets Azure and CI Pipelines Wiz, Nov 17, 2026 archived copy
    2. Microsoft agent-framework PyPI Package Compromised StepSecurity, Nov 18, 2026 archived copy
    3. Microsoft's Agent Framework PyPI package compromised to steal credentials BleepingComputer, Nov 18, 2026 archived copy
    4. Microsoft Agent Framework Releases Poisoned With Credential Stealer SecurityWeek, Nov 18, 2026 archived copy

    Related incidents

    Spotted an error, or are you the vendor and want to respond? Email support@agentvet.ai. We log every correction publicly.