News · AI Reliability & Operations · Software Factories & AI-Assisted Engineering
Malicious Microsoft Agent Framework versions reach PyPI
Two versions of the Python package contained code that could run at startup and targeted credentials in developer and CI environments.
Malicious versions 1.26.1 and 1.26.2 of Microsoft's agent-framework Python package appeared on PyPI on November 17, 2026. Both contained code that could run at Python startup and targeted developer and CI credentials, including Azure identity credentials. The reports describe potential exposure, while the outcome for any particular environment depends on evidence from that environment. Socket analysis OhShit incident report
What happened
Socket's package analysis identifies the affected versions and describes credential-stealing code that could run at Python startup. That execution point matters to an investigation because the relevant question extends beyond whether anyone intentionally called a feature of the framework. An environment that contained an affected release and started Python warrants a different assessment from an environment whose only evidence is a reference to the package name. Socket analysis
OhShit reports that a Microsoft maintainer confirmed removal of both releases. Its incident account also distinguishes the presence of collection code from successful token issuance or exfiltration on an individual host. Socket describes what the code was designed to do, and the OhShit account specifies what that analysis can establish about the consequences. Removal describes the status of the releases. Historical exposure still depends on what individual environments resolved, installed and ran. Socket analysis OhShit incident report
Why it matters
An organization can keep its assessment precise by treating a declared dependency, an installed version and evidence of credential activity as distinct findings. The declared dependency identifies a place to investigate. The installed version ties an environment to one of the releases named by the reports. Evidence about Python execution and identity activity addresses later questions about whether the code could have run and what followed. Each finding supports a different statement about the incident. Socket analysis OhShit incident report
Developer environments and CI also represent different places to look for evidence. A workstation inventory can help establish what was present on that machine. A build record can help establish what a particular CI run used. The reports identify both as targets, so findings for one environment should be scoped to that environment. This distinction matters for AI Reliability & Operations when an AI framework is part of a wider build or deployment process. Socket analysis OhShit incident report
What the Transition2 desk tested
The desk ran a static dependency audit against six synthetic package records. The fixture covered exact matches for both affected versions, a mixed-case package name with repeated separators, an older release, an unrelated package at the same version as an affected release and an entry with no version. The plan specified CPython 3.12.8. The recorded run used CPython 3.9.6 and its standard library.
CHECK fixture_size: PASS observed=6
CHECK first_release: PASS expected=('agent-framework', '1.26.1', 'affected') observed=('agent-framework', '1.26.1', 'affected')
CHECK second_release: PASS expected=('agent-framework', '1.26.2', 'affected') observed=('agent-framework', '1.26.2', 'affected')
CHECK mixed_case_and_separators: PASS expected=('agent-framework', '1.26.2', 'affected') observed=('agent-framework', '1.26.2', 'affected')
CHECK older_version_control: PASS expected=('agent-framework', '1.26.0', 'clear') observed=('agent-framework', '1.26.0', 'clear')
CHECK unrelated_package_control: PASS expected=('unrelated-package', '1.26.2', 'clear') observed=('unrelated-package', '1.26.2', 'clear')
CHECK unversioned: PASS expected=('agent-framework', None, 'unknown') observed=('agent-framework', None, 'unknown')
CHECKS 7/7
What this does not show. The run used fixture text only. It establishes how the matcher classified the supplied records. It provides no evidence about what was installed or executed on any host, whether a token was issued or whether credentials were exposed.
What it means for businesses
For an organization assessing its own exposure, the most useful status is one tied to an environment and evidence. A confirmed affected installation belongs in a different category from an inventory entry with an unresolved version. Evidence about credential activity deserves its own finding because the reports describe targeting and collection code while leaving host-specific outcomes to investigation. This gives incident owners a way to communicate progress without turning a package-level advisory into a claim about the whole organization. Socket analysis OhShit incident report
What it means for AI users
People who encounter Agent Framework through a tool or service may know the product name without knowing which Python packages the operator installed. In that situation, the scope of a status update matters. The removal reported by OhShit concerns the status of both versions on PyPI. A statement about whether a service used an affected version answers a separate question about that service. Any conclusion about credential impact requires evidence beyond the product name. OhShit incident report Socket analysis
What it means for developers
The reports identify specific package versions, which makes an exact version check an appropriate first pass over dependency records. A missing version leaves a question open. A match identifies a record whose environment may need further review. Because the reported code could run at Python startup, relevant records include the resolved dependencies and the execution history of environments that contained an affected version. The distinction between a package match and evidence of credential activity should carry through to any resulting incident report. Socket analysis OhShit incident report
Copyright Eric MacDougall.
Sources
- Microsoft's agent-framework PyPI package compromised with credential stealer (accessed 2026-11-18)
- Microsoft's agent-framework PyPI releases steal cloud and CI credentials at Python startup (accessed 2026-11-18)