MAL-2026-20101: Malicious code in agent-framework (PyPI)

Published Nov 17, 2026
·
Updated

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 agentframework. In 1.26.1 the files are agentframeworkmeta.pth and agentframeworkmeta/telemetry.py, started from a hook added to agentframeworkmeta/init.py. In 1.26.2 they are renamed to afruntimediag.pth and afruntimediag.py; agentframeworkmeta/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 AFTEL, 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 (SYSTEMACCESSTOKEN, SYSTEMOIDCREQUESTURI); and Azure managed-identity tokens from the instance metadata service (169.254.169.254, IDENTITYENDPOINT). 1.26.2 adds theft of GitHub Actions OIDC tokens (ACTIONSIDTOKENREQUESTURL, ACTIONSIDTOKENREQUESTTOKEN, ACTIONSRUNTIMETOKEN), 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.

Affected Software

1 affected component
pip/agent-framework=1.26.2, =1.26.1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 1.26.0
  2. Operational

    If 1.26.1 or 1.26.2 was installed, rotate credentials reachable from that environment, including CI and GitHub Actions secrets.

Event History

Nov 17, 2026
Advisory Published
via OSV·09:55 PM
Data Sourced
via OSV·09:55 PM
DescriptionAffected Software

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203