Skip to content
Heist/ feed
Unrated

Malicious code in metrics-sdk (PyPI)

Type: advisorySource: OSV1 source record

--- _-= Per source details. Do not edit below this line.=-_ ## Source: amazon-inspector (60ce93696722d633e9eea7b3fac6f76ebe61a581bd2d1d79efb778f8cb015399) metrics_sdk 999.0.0 is a dependency-confusion beacon. setup.py runs on `pip install` and metrics_sdk/__init__.py runs on `import metrics_sdk`; both hex-encode the installer's hostname into a subdomain label of the form `mssdk--.84avt3516s4q1obsv9q0mh4u2l8dw3ks.x9.to` and then trigger `socket.gethostbyname(host)` plus `urllib.request.urlopen('http://' + host + '/')`, leaking the hostname to a hardcoded third-party domain over both DNS and plaintext HTTP. The version number 999.0.0 and the package description labeling itself a 'dependency-confusion PoC placeholder' are consistent with an artifact designed to win resolution against an internal package name from public PyPI and beacon from whichever build system pulls it in. The self-label is author-controlled and does not change the observable behavior: any installer that resolves this package on `pip install` or on import discloses its hostname to an attacker-controlled beacon domain with no opt-in. ## Source: kam193 (1378dcfc94bda0e9beb3e3d66c0588967a164741686ab473826fbab077e7afb9) Installing the package or importing the module exfiltrates basic information about the host, and the package has no other purpose. --- Category: PROBABLY_PENTEST - Packages looking like typical pentest packages, but also anything that looks like testing, exploring pre-prepared kits, research & co,

Announced Source revision 1
Original source ↗

MAL-2026-17194

Primary source · Revision 1

Imported from structured advisory data. Source references identify upstream records or fields; verify affected versions and your deployed configuration.

Security context

Source reference: osv:MAL-2026-17194

metrics-sdk

Source reference: /affected/0/package/name

Affected versions
999.0.0

Source reference: /affected/0/versions

1000.0.0

Source reference: /affected/0/versions

1001.0.0

Source reference: /affected/0/versions

Fixed versions
Not stated in this record
Prerequisites
Not stated in this record

Structured affected-version data

Original package identities and version rules from this source.

[
  {
    "package": {
      "name": "metrics-sdk",
      "purl": "pkg:pypi/metrics-sdk",
      "ecosystem": "PyPI"
    },
    "versions": [
      "999.0.0",
      "1000.0.0",
      "1001.0.0"
    ],
    "database_specific": {
      "cwes": [
        {
          "name": "Embedded Malicious Code",
          "cweId": "CWE-506",
          "description": "The product contains code that appears to be malicious in nature."
        },
        {
          "name": "Embedded Malicious Code",
          "cweId": "CWE-506",
          "description": "The product contains code that appears to be malicious in nature."
        }
      ],
      "source": "https://github.com/ossf/malicious-packages/blob/main/osv/malicious/pypi/metrics-sdk/MAL-2026-17194.json",
      "indicators": {
        "evidence_files": [
          {
            "path": "setup.py",
            "tlsh": "ba01fe01ed00a4bbd65301cc98600191262ab25b9a235c76bdcc538407cf9f0c4b22ab",
            "sha256": "c35374333854ee3b911bc58053b9ae44d20c0a3c29ea0bfb9969543c8d17529b"
          },
          {
            "path": "metrics_sdk/__init__.py",
            "tlsh": "fff09e52de1090b7d60311c8547042d4221bb147d9235c36fecc57844bce0b1c0721a7",
            "sha256": "a3c0f40974374809a26a558d4445fa77d2924346a7af8bcda239530047e40dd0"
          }
        ]
      }
    }
  }
]

Publisher severity

No explicit severity was provided.

Event
#22515 · Revision 1
Added to Heist Feed
Publisher date
Read the original announcement