MAL-2026-10197

See a problem?
Import Source
https://github.com/ossf/malicious-packages/blob/main/osv/malicious/pypi/metemask-sdk/MAL-2026-10197.json
JSON Data
https://api.osv.dev/v1/vulns/MAL-2026-10197
Published
2026-07-12T11:23:55Z
Modified
2026-07-12T15:31:57.002719911Z
Summary
Malicious code in metemask-sdk (PyPI)
Details

-= Per source details. Do not edit below this line.=-

Source: amazon-inspector (a99855c93b46f7b996a005065c319bbb24c9d1f497d05dfd38fc83d1b21facdd)

metemask-sdk is a typosquat of the legitimate metamask-sdk package. On import, the top-level init.py performs an outbound HTTP fetch to https://gateway.pinata.cloud/ipfs/QmWMbuhKt24ssRKXCeiU94NoZGYcEunGnm6uvSKRwkejYP, passes the response body to exec(), and then invokes a main() function from the executed namespace. No integrity check (hash/signature) is performed on the fetched content, the fetch is wrapped in a bare try/except to suppress errors, and the IPFS CID resolves to attacker-controlled content that can change arbitrarily. The package's advertised public API (connect, signmessage, getbalance) is a non-functional stub that returns constants and random bytes, serving as a facade for the import-time dropper.

Source: kam193 (0f59169bc0b142713f95865c41501f7eade6b73d1aea633262e40d514e6b6546)

During import, the code downloads and executes a remote script. The script collects sensitive files, including cryptocurrency wallet private keys and seeds, SSH keys, dotenv files and uploads them to IPFS. After that, it communicates with C2 and awaits further commands to execute.


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

Campaign: 2026-07-metemask-sdk

Reasons (based on the campaign):

  • files-exfiltration

  • typosquatting

  • exfiltration-ssh-keys

  • crypto-related

  • Downloads and executes a remote malicious script.

  • exfiltration-crypto

  • The package contains code to execute remote commands (probably limited to a specific set) on the victim's machine.

  • uses:ipfs

Database specific
{
    "malicious-packages-origins": [
        {
            "modified_time": "2026-07-12T11:23:55.910157Z",
            "source": "kam193",
            "sha256": "0f59169bc0b142713f95865c41501f7eade6b73d1aea633262e40d514e6b6546",
            "import_time": "2026-07-12T11:55:16.830963377Z",
            "id": "pypi/2026-07-metemask-sdk/metemask-sdk",
            "versions": [
                "1.2.0",
                "1.2.1"
            ]
        },
        {
            "import_time": "2026-07-12T15:24:47.759640104Z",
            "modified_time": "2026-07-12T15:11:07Z",
            "sha256": "a99855c93b46f7b996a005065c319bbb24c9d1f497d05dfd38fc83d1b21facdd",
            "source": "amazon-inspector",
            "id": "IN-MAL-2026-009748",
            "versions": [
                "1.2.1"
            ]
        },
        {
            "modified_time": "2026-07-12T15:10:56Z",
            "source": "amazon-inspector",
            "sha256": "b54557754f5aa64e38d0b038c76c8a13e7964e8a1b8e6f2dc7db63ce8ecbc130",
            "import_time": "2026-07-12T15:24:47.683797532Z",
            "id": "IN-MAL-2026-009747",
            "versions": [
                "1.2.0"
            ]
        }
    ],
    "iocs": {
        "urls": [
            "http://107.161.90.180:7778",
            "https://gateway.pinata.cloud/ipfs/QmP2RrfNCNabLzPYncMGgFwAmttDafczpJLS8oxvQRBVqg"
        ],
        "ips": [
            "107.161.90.180"
        ]
    }
}
References
Credits

Affected packages

PyPI / metemask-sdk

Package

Affected ranges

Affected versions

1.*
1.2.0
1.2.1

Database specific

cwes
[
    {
        "cweId": "CWE-506",
        "name": "Embedded Malicious Code",
        "description": "The product contains code that appears to be malicious in nature."
    },
    {
        "cweId": "CWE-506",
        "name": "Embedded Malicious Code",
        "description": "The product contains code that appears to be malicious in nature."
    }
]
indicators
{
    "package_integrity": [
        {
            "filename": "metemask_sdk-1.2.1-py3-none-any.whl",
            "hashes": {
                "md5": "af43019560028ebe3b806096c9caa82d",
                "blake2b_256": "764b85741e75c7927851fc14e61a7cdab0a23c9e9dccb165a02b766fe45fd61f",
                "sha256": "d65aa3d91dafceeda6a639f54bdd9f8b51c228f8906a756e74770a6f778bd16c"
            }
        },
        {
            "filename": "metemask_sdk-1.2.1.tar.gz",
            "hashes": {
                "md5": "971e468cea74e6bc11d691d9500ddb68",
                "blake2b_256": "42dd4897a72489934ed8c02ebbe1ffac7bb440572afc35fc50d123276db60962",
                "sha256": "7e48af97d691c767f7b7c7c06bd0e37b250d234a863927023401022fc55f596e"
            }
        }
    ],
    "evidence_files": [
        {
            "tlsh": "17f0e17678817845d347b51d74e5f734674d3957d24d98313b9d01305b65030f0f1159",
            "sha256": "7fd14e69acc3ef539b9c83ee4a6528f07afcbf0ecaa0f3a72e7a5f9202984cc5",
            "path": "metemask_sdk/__init__.py"
        }
    ]
}
source
"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/pypi/metemask-sdk/MAL-2026-10197.json"