MAL-2026-20377

See a problem?
Import Source
https://github.com/ossf/malicious-packages/blob/main/osv/malicious/pypi/caspian-client/MAL-2026-20377.json
JSON Data
https://api.osv.dev/v1/vulns/MAL-2026-20377
Published
2026-11-23T18:00:50Z
Modified
2026-11-23T18:30:05Z
Summary
Malicious code in caspian-client (PyPI)
Details

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

Source: amazon-inspector (0f39350a4bccbbf4d02120154b9bece376075768e87e32a3f3536c4dd9503d4b)

caspian_client/init.py calls report_environment() unconditionally on import, and the sdist's setup.py plus the custom PEP 517 backend.py invoke the same path during build_wheel / prepare_metadata_for_build_wheel, so the behavior fires on pip install of the sdist, on pip install of the wheel followed by any import, and on any downstream import of the package. _sentry.py spawns a detached long-running Python subprocess (start_new_session=True on POSIX, DETACHED_PROCESS on Windows) that polls the hardcoded bare-IP endpoint http://201.79.44.36:8765/poll over plaintext HTTP and either launches subprocess.Popen on returned 'data' payloads or passes strings prefixed 'Telemetry Task: ' to exec(), giving the operator of that endpoint arbitrary remote code execution on the host. The watchdog is persisted via a lock file in /tmp and outlives the triggering process. In parallel, _common_fields() enumerates the entire os.environ and packs every KEY=VALUE pair into contexts.telemetry.diagnostic_debug along with hostname, process tree, cwd listing and client IP, then POSTs the payload to a hardcoded third-party Sentry ingest DSN (o4512443838169088.ingest.us.sentry.io/4512443881684992). On CI and developer machines this harvests AWS, GitHub, npm, PyPI and database credentials verbatim. The module is named _sentry.py and carries a docstring describing a 'minimal Sentry-compatible error reporter' with an inline comment asserting the DSN is 'Never a bare IP', while the same file defines the bare-IP watchdog URL; the exec payload is assembled by string substitution into a raw-string template to avoid literal exec/subprocess tokens in the fetched content. The declared data-platform-API-client purpose does not require environment scraping or a polling connector.

Database specific
{
    "malicious-packages-origins": [
        {
            "id": "IN-MAL-2026-023054",
            "import_time": "2026-11-23T18:13:33.980247368Z",
            "modified_time": "2026-11-23T18:00:50Z",
            "sha256": "0f39350a4bccbbf4d02120154b9bece376075768e87e32a3f3536c4dd9503d4b",
            "source": "amazon-inspector",
            "versions": [
                "2.9.15"
            ]
        },
        {
            "id": "IN-MAL-2026-023056",
            "import_time": "2026-11-23T18:13:34.211914873Z",
            "modified_time": "2026-11-23T18:01:09Z",
            "sha256": "9f395f43a53a8f932391ed4d138a0c7fc566ae1365fa28c19ff4a27be17f0b7c",
            "source": "amazon-inspector",
            "versions": [
                "2.9.18"
            ]
        },
        {
            "id": "IN-MAL-2026-023058",
            "import_time": "2026-11-23T18:13:34.45326395Z",
            "modified_time": "2026-11-23T18:01:24Z",
            "sha256": "ebaac0f7ffc3acd9ae19a0efd89233a4467c0a255fff41144c44a558071afe5f",
            "source": "amazon-inspector",
            "versions": [
                "2.9.13"
            ]
        },
        {
            "id": "IN-MAL-2026-023061",
            "import_time": "2026-11-23T18:13:34.794281683Z",
            "modified_time": "2026-11-23T18:01:44Z",
            "sha256": "1714856dbabc2b8c93e1561c0ebb592017e347bd6f154677533ebd5f4a7a49ae",
            "source": "amazon-inspector",
            "versions": [
                "2.9.11"
            ]
        },
        {
            "id": "IN-MAL-2026-023059",
            "import_time": "2026-11-23T18:13:34.550347355Z",
            "modified_time": "2026-11-23T18:01:31Z",
            "sha256": "509a047d7dfeec9001e99bd375d5f367773dd0ed687dce9e4a64c3fb98985be9",
            "source": "amazon-inspector",
            "versions": [
                "2.9.10"
            ]
        },
        {
            "id": "IN-MAL-2026-023055",
            "import_time": "2026-11-23T18:13:34.08532524Z",
            "modified_time": "2026-11-23T18:00:59Z",
            "sha256": "5d5a4610ccba62f2fc4083e31eccc0be51f86b1116e99ddf3a353b20b6894f23",
            "source": "amazon-inspector",
            "versions": [
                "2.9.17"
            ]
        },
        {
            "id": "IN-MAL-2026-023057",
            "import_time": "2026-11-23T18:13:34.297899095Z",
            "modified_time": "2026-11-23T18:01:16Z",
            "sha256": "70ce7769883e36ff78f159e2d477ef84a0dce0a148af15d0b7fd4c9e8f090794",
            "source": "amazon-inspector",
            "versions": [
                "2.9.16"
            ]
        },
        {
            "id": "IN-MAL-2026-023060",
            "import_time": "2026-11-23T18:13:34.677880551Z",
            "modified_time": "2026-11-23T18:01:38Z",
            "sha256": "7ced624f4fba42c63164425d0f3a99dd31e16045827ea3bf7951e096ae38d1b0",
            "source": "amazon-inspector",
            "versions": [
                "2.9.12"
            ]
        }
    ]
}
References
Credits

Affected packages

PyPI / caspian-client

Package

Name
caspian-client
View open source insights on deps.dev
Purl
pkg:pypi/caspian-client

Affected ranges

Affected versions

2.*
2.9.10
2.9.11
2.9.12
2.9.13
2.9.15
2.9.16
2.9.17
2.9.18

Database specific

cwes
[
    {
        "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.",
        "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.",
        "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.",
        "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.",
        "name": "Embedded Malicious Code"
    }
]
indicators
{
    "evidence_files": [
        {
            "artifacts": [
                "caspian_client-2.9.15.tar.gz",
                "caspian_client-2.9.15-py3-none-any.whl"
            ],
            "path": "caspian_client/_sentry.py",
            "sha256": "17399be4629402bbc2f85103a73fa22330b2db28019e6d999dccb3571e087431",
            "tlsh": "a3c29552d8242d77d3c3c25d09a7e091b77569535a065838fceca3ac2f8c47981f27ea"
        },
        {
            "artifacts": [
                "caspian_client-2.9.15.tar.gz",
                "caspian_client-2.9.15-py3-none-any.whl"
            ],
            "path": "caspian_client/__init__.py",
            "sha256": "45e806937ebf1abf882db882f97dae4bd6984a10a632012b9daf2b4dcec448df",
            "tlsh": "c5012b2bc7355e3b917a4784c46bc46a2b3167b32d4238003a14126e1f8db9fde7d15e"
        }
    ],
    "package_integrity": [
        {
            "filename": "caspian_client-2.9.15-py3-none-any.whl",
            "hashes": {
                "blake2b_256": "df6b000fa9576a09252831ba6cd7ec82f5eebe5092d14ff0bc2f4a34751f2d5e",
                "md5": "3f69dfe650a8cabc329cef7ad2581052",
                "sha256": "b0608c8004a2007f537aaeb0be81dc7bf27f94e7dc568577be33d208c8accf79"
            }
        },
        {
            "filename": "caspian_client-2.9.15.tar.gz",
            "hashes": {
                "blake2b_256": "2443db7e564db00a331726c5d5fef4e06b3a520e27acd4bee84c5718b8c0b3de",
                "md5": "1f15fdd527c41f48e549c0b253877d20",
                "sha256": "b3c11ba8cb55aeaa71f10950df7e9bc17e75e363889deacd67a59fb795aeeb3a"
            }
        }
    ]
}
source
"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/pypi/caspian-client/MAL-2026-20377.json"