NIST deprecates RSA-2048 from 2030. Find every one of them before attackers do.
Malicious package

agent-frameworkPyPI

Advisory published Updated

agent-framework is a confirmed malicious PyPI package (MAL-2026-20101) that steals credentials and exfiltrates sensitive data (malicious versions 1.26.1, 1.26.2). Do not install it — remove it immediately and rotate any exposed credentials.

Malicious code in agent-framework (PyPI)

MAL-2026-20101
Immediate action
Remove the package, then rotate any secrets the build/runtime could reach.
pip uninstall agent-framework

What this malware does

Malicious releases of the legitimate "agent-framework" package (Microsoft Agent Framework). Versions 1.26.1 and 1.26.2 add a credential stealer that is not present in the last clean release, 1.26.0. Both releases were published on 2026-11-17 (1.26.1 at 20:35 UTC as a wheel only, 1.26.2 at 21:08 UTC) and have since been removed from PyPI.

How it triggers: each wheel adds an executable .pth startup hook that imports a helper module. Python runs .pth files at every interpreter start, so the code executes as soon as the package is installed, without importing agent_framework. In 1.26.1 the files are agent_framework_meta.pth and agent_framework_meta/_telemetry.py, started from a hook added to agent_framework_meta/init.py. In 1.26.2 they are renamed to af_runtime_diag.pth and af_runtime_diag.py; agent_framework_meta/init.py is identical to the clean 1.26.0 and the module calls its own _start() on import, so the .pth is the only trigger. The helper detaches into a background process (os.fork, os.setsid), is guarded by the environment marker _AF_TEL, and silences all errors. The rest of the wheel matches 1.26.0 and the dependency is unchanged (agent-framework-core[all]==1.26.0).

What it does (info stealer): it collects hostname, user, working directory and arguments; environment variables whose names contain TOKEN, SECRET, PASSWORD, KEY, AZURE, AWS, GITHUB, HF_, OPENAI, NPM, PIP or CI_; the environment of other processes (/proc/*/environ); credential files (~/.azure, .npmrc, .netrc, .git-credentials, .docker/config.json, Hugging Face token, Azure DevOps agent .credentials, .env files); Azure DevOps OIDC tokens (SYSTEM_ACCESSTOKEN, SYSTEM_OIDCREQUESTURI); and Azure managed-identity tokens from the instance metadata service (169.254.169.254, IDENTITY_ENDPOINT). 1.26.2 adds theft of GitHub Actions OIDC tokens (ACTIONS_ID_TOKEN_REQUEST_URL, ACTIONS_ID_TOKEN_REQUEST_TOKEN, ACTIONS_RUNTIME_TOKEN), adds the /home/runner paths, and raises the limit on captured files from 60 to 80.

Exfiltration: the data is compressed with zlib, base64-encoded and sent by HTTP POST to https://webhook.site/d381fd80-ec62-42ad-8f5c-d1b15103c9bb. The URL is stored base64-encoded (_ENC) and is identical in both releases. The User-Agent is af-runtime-diagnostics/1 in 1.26.1 and runtime-diagnostics/1 in 1.26.2.

Wheel sha256: 1.26.1 d27fa34414e6201d5e03e559ef634f020057554d7b3f4898dd5d7cd3e989e110; 1.26.2 3d20a8bc91351a9a16b6db243b848ceca0206b7a8623b02d2af553a9c9f7e0a9.

Anyone who installed 1.26.1 or 1.26.2 should treat the environment as exposed and rotate the credentials reachable from it, including CI and GitHub Actions secrets. 1.26.0 and earlier are not affected. We have not attributed this to a known campaign.

The wheel ships agent_framework_meta.pth containing import agent_framework_meta, which runs on every Python interpreter start (not just on import agent_framework). The imported module spawns a background thread that harvests installer-side secrets and POSTs a base64+zlib-compressed payload to https://webhook.site/d381fd80-ec62-42ad-8f5c-d1b15103c9bb, whose URL is concealed as a base64 literal (_ENC) decoded at runtime. Collection includes: environment variables matching TOKEN/SECRET/PASSWORD/KEY/AZURE/AWS/GITHUB/OPENAI patterns; credential files ~/.azure, ~/.npmrc, ~/.netrc, ~/.git-credentials, ~/.docker/config.json, Hugging Face tokens; /proc/[0-9]*/environ scraping of other processes; Azure IMDS (169.254.169.254) and App Service IDENTITY_ENDPOINT managed-identity token requests across multiple resource audiences (management.azure.com, vault.azure.net, graph.microsoft.com, storage, etc.); and an ADO OIDC token-exchange POST using SYSTEM_ACCESSTOKEN against SYSTEM_OIDCREQUESTURI. Package metadata impersonates Microsoft and mimics the real microsoft/agent-framework README as cover. The name resembles the legitimate Microsoft package.

Versions 1.26.1, 1.26.2 were compromised.

Compromised versions use PTH file to trigger malicious actions on every Python process startup. It then exfiltrates environment variables, credential files and tokens from cloud metadata endpoints.

Category: MALICIOUS - The campaign has clearly malicious intent, like infostealers.

Campaign: 2026-11-compr-agent-framework

Reasons (based on the campaign):

  • exfiltration-env-variables

  • obfuscation

  • exfiltration-cloud-tokens

  • exfiltration-credentials

  • compromised-package

  • abuses-pth

Malicious versions

2 flagged
1.26.11.26.2

Indicators of compromise (SHA-256)

72f7549a69d5529aca2fb787d2fbb62f94e73afd9ca1a832608687e1d185e594
7170b55e6541c89d914a388534b7ccaeb303abb46def27bda667f5ad2051ed5d

Detection & response playbook

Credential / info stealer
  1. Find it

    Search your lockfiles and build artifacts for agent-framework (2 malicious versions).

  2. If you installed it — respond

    agent-framework is built to steal secrets, so assume every credential the build or runtime could read is compromised. Remove it from your project and lockfile, then rotate ALL exposed secrets — npm/registry tokens, cloud keys, CI/CD secrets, SSH keys, and any .env values — from a known-clean machine. Audit logs for unauthorized use of those credentials.

  3. Did it already run?

    If agent-framework was installed, its post-install payload may already have run. Removing the package does not undo that — check outbound connections and credential use from the install window onward.

Frequently asked questions

No. agent-framework on PyPI has been identified as a malicious package (versions 1.26.1, 1.26.2 flagged). It should be removed immediately — do not install or keep it in your dependency tree.

Campaign

IN-MAL-2026-0228182026-11-compr-agent-framework

References

Credits

  • Amazon Inspector · finder
  • Kamil Mańkowski (kam193) · analyst
  • OX Security · finder

Detect & block this

O3 blocks agent-framework-class packages before install and in CI — and if it already ran, its runtime egress monitoring catches the credential exfiltration and severs the channel.

Explore

agent-framework (PyPI) malicious package — MAL-2026-20101 | O3 Security