Highosv:MAL-2026-20101

    Malicious code in agent-framework (PyPI)

    Published Sources: OSV (Schadpakete)

    • Malicious package
    Share

    What is affected, what to do

    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.

    Uninstall the package, isolate affected environments and rotate credentials that were available during installation.

    Not sure whether and how you are affected? Ask a question about this vulnerability

    Malicious package

    PyPIagent-framework

    “agent-framework” is registered as malicious in the PyPI repository. Anyone who installed the package should uninstall it immediately, isolate affected environments and rotate credentials that were present during installation.

    Affected versions (2)

    • 1.26.1
    • 1.26.2

    purl: pkg:pypi/agent-framework

    Sources (2)

    • amazon-inspectorIN-MAL-2026-022818

      Versions from this source: 1.26.1

      sha256: 72f7549a69d5529aca2fb787d2fbb62f94e73afd9ca1a832608687e1d185e594

    • kam193pypi/2026-11-compr-agent-framework/agent-framework

      Versions from this source: 1.26.1, 1.26.2

      sha256: 7170b55e6541c89d914a388534b7ccaeb303abb46def27bda667f5ad2051ed5d

    The OSSF `malicious-packages` namespace lists packages flagged as malicious by static analysis or sandbox detonation. An entry here is a confirmed finding, not a suspicion.

    Metrics

    —

    XIEM Effective CVSS

    No value is available for this vulnerability.

    —

    CVSS v3

    No value is available for this vulnerability.

    —

    EPSS score

    No value is available for this vulnerability.

    Show all metrics
    Severity
    High
    Priority (0–325)

    The priority score is a consolidated metric that condenses several individual signals into a single, action-guiding ranking: technical severity (CVSS), exploitation likelihood (EPSS), known-exploited status (KEV) and the context of the affected asset. The aim is to answer the only truly important question in vulnerability management: what first?

    Read in glossary
    30.00 Methodology
    Exploit maturity

    An exploit is code or a technique that specifically uses a concrete vulnerability to force unintended behaviour — such as executing code or escalating privileges. It is the tool that turns a theoretical flaw into a practical attack.

    Read in glossary
    no public PoC known
    KEV status

    The KEV catalogue is a list maintained by the US authority CISA of vulnerabilities for which active exploitation in the wild has been confirmed. It answers not the question „how severe?“ but „is it already being attacked?“ — thereby sharply prioritising patching.

    Read in glossary
    —
    Published

    Classification under NIS2 and CRA

    Rule-based classification from exploitation status and severity. It does not replace a case-by-case assessment.

    NIS2

    NIS2 is EU Directive (EU) 2022/2555 to raise the level of cybersecurity across the Union. It substantially broadens obligations compared with the first NIS directive: more sectors, mandatory risk management, staged reporting duties and personal accountability of senior management.

    Read in glossary
    High technical severity: assess and remediate the vulnerability in vulnerability handling under Art. 21(2)(e) NIS2 and document the decision.
    CRA

    The CRA is EU Regulation (EU) 2024/2847 setting horizontal cybersecurity requirements for „products with digital elements“ — from industrial controllers and software to connected consumer devices. For the first time manufacturers must ensure security across the entire product lifecycle, handle vulnerabilities and provide security updates.

    Read in glossary
    From 11.12.2027, Annex I Part II CRA requires manufacturers of affected products with digital elements to handle vulnerabilities without delay and provide security updates.
    ISO/IEC 27001

    ISO/IEC 27001 is the internationally leading standard for an information security management system (ISMS). It describes a risk-based, process-oriented framework to systematically plan, implement, review and improve information security.

    Read in glossary
    Control A.8.8, management of technical vulnerabilities: assess relevance to your systems, plan remediation and keep evidence.

    Description

    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

    Source: OSV (Open Source Vulnerabilities)