PYSEC-2026-4388: agent-framework 1.26.1 and 1.26.2 contain credential-stealing code
Published 2026-11-17 · Updated 2026-11-18
Summary
The agent-framework package versions 1.26.1 and 1.26.2 contain unauthorized credential-stealing malicious code injected via a .pth file. Any engineering or security team whose systems or CI jobs installed these versions must treat their environment as compromised.
Who is affected
Deployments that installed agent-framework version 1.26.1 or 1.26.2 are affected, as the malicious payload executes automatically upon Python interpreter start without requiring an explicit package import. The payload forks a background process to harvest environment variables, credential files, process environment secrets, cloud and CI OIDC tokens, and Azure managed identity tokens before exfiltrating the compressed data to an external webhook.
Exploitability
Active exploitation via CISA KEV is not documented. CVSS vector, base score, and EPSS are not documented.
Remediation
- Treat any system or CI job that installed agent-framework version 1.26.1 or 1.26.2 as compromised.
- Rotate every credential reachable from the affected environment, including cloud identities, CI tokens, and package registry tokens.
- Review cloud and CI audit logs for unauthorized use of rotated credentials.
- Downgrade to version 1.26.0 or use a non-affected version as both malicious versions have been removed from PyPI.
How to check your project
- Check Python environments for the presence of agent-framework versions 1.26.1 or 1.26.2.
- Look for indicators of compromise including files agent_framework_meta.pth, agent_framework_meta/_telemetry.py, af_runtime_diag.pth, or af_runtime_diag.py.
- Check for wheel SHA-256 hashes d27fa34414e6201d5e03e559ef634f020057554d7b3f4898dd5d7cd3e989e110 or 3d20a8bc91351a9a16b6db243b848ceca0206b7a8623b02d2af553a9c9f7e0a9.
- Inspect network logs for outbound requests to webhook.site using User-Agents 'af-runtime-diagnostics/1' or 'runtime-diagnostics/1'.
Automated analysis of the published advisory data, generated 2026-11-19. Not human-reviewed; verify against the official advisory. How this works.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | Upgrade |
|---|---|---|---|---|
| PyPI | agent-framework |
see advisory | not published | - |
FAQ
Which versions of agent-framework are malicious?
Versions 1.26.1 and 1.26.2 contain credential-stealing code.
Is version 1.26.0 affected?
No, version 1.26.0 is not affected.
What data is collected by the malicious payload?
The payload collects environment variables matching specific sensitive names, credential files, secrets from other processes' environ, Azure DevOps OIDC tokens, Azure managed identity tokens, GitHub Actions OIDC tokens, and runner temp files.
Original advisory description
References
- EVIDENCE https://inspector.pypi.io/project/agent-framework/1.26.1/packages/6a/ce/71a695e356e692b2b74de921418b41c1aee5d2cd2501fe8e01469083339b/agent_framework-1.26.1-py3-none-any.whl/agent_framework_meta.pth
- EVIDENCE https://inspector.pypi.io/project/agent-framework/1.26.1/packages/6a/ce/71a695e356e692b2b74de921418b41c1aee5d2cd2501fe8e01469083339b/agent_framework-1.26.1-py3-none-any.whl/agent_framework_meta/__init__.py#line.34
- EVIDENCE https://inspector.pypi.io/project/agent-framework/1.26.1/packages/6a/ce/71a695e356e692b2b74de921418b41c1aee5d2cd2501fe8e01469083339b/agent_framework-1.26.1-py3-none-any.whl/agent_framework_meta/_telemetry.py
- EVIDENCE https://inspector.pypi.io/project/agent-framework/1.26.2/packages/a9/31/b8edc034d5b544831b70c3353ae8c1ec2dd7d7389d15da6ec5402e6ec509/agent_framework-1.26.2-py3-none-any.whl/af_runtime_diag.pth
- EVIDENCE https://inspector.pypi.io/project/agent-framework/1.26.2/packages/a9/31/b8edc034d5b544831b70c3353ae8c1ec2dd7d7389d15da6ec5402e6ec509/agent_framework-1.26.2-py3-none-any.whl/af_runtime_diag.py#line.9
- EVIDENCE https://inspector.pypi.io/project/agent-framework/1.26.2/packages/a9/31/b8edc034d5b544831b70c3353ae8c1ec2dd7d7389d15da6ec5402e6ec509/agent_framework-1.26.2-py3-none-any.whl/af_runtime_diag.py#line.147
- ARTICLE https://www.wiz.io/blog/malicious-version-of-microsofts-agent-framework-published-to-pypi
- PACKAGE https://pypi.org/project/agent-framework/
Source records: PYSEC-2026-4388 (OSV.dev).