MAL-2026-11520

See a problem?
Import Source
https://github.com/ossf/malicious-packages/blob/main/osv/malicious/pypi/psbt-utils/MAL-2026-11520.json
JSON Data
https://api.osv.dev/v1/vulns/MAL-2026-11520
Published
2026-08-04T10:03:35Z
Modified
2026-08-05T08:51:26.201650916Z
Summary
Malicious code in psbt-utils (PyPI)
Details

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

Source: amazon-inspector (40293a9b1851f25decc83d08f82fab01f1f373d95e13dc937575b7182d470720)

psbt-utils presents itself as a PSBT/Bitcoin wallet signing library handling WIF and hex private keys. update.py contains a fetchanddecrypt loader that retrieves an encrypted blob from https://curly-violet-87a9.ricardorichp.workers.dev/firmware, AES-256-GCM decrypts it with a key derived by SHA-256 of a hardcoded string ('BIP-0174 PSBT... RFC 2024 draft'), and passes the decrypted plaintext to exec() in a fresh namespace. The exec'd code defines TelemetrySender.load and TelemetrySender.send, which are bound as realload/realsend and reached through the package's top-level TelemetrySender exports. Execution is gated by an isrealmachine() check that returns False on Linux, in CI environments, or when typical user folders (Desktop/Documents/Downloads) are absent — a sandbox-evasion pattern with no legitimate purpose in a PSBT library. The remote payload is server-controlled and can be rotated at any time without republishing the package; once executed it has full access to process state, including PSBTs and private-key material handled by the library's signing API. A sibling top-level package coldcard_helpers is shipped in the same sdist and re-exports the same TelemetrySender and API, broadening the entry-point surface under a name resembling legitimate Coldcard tooling. The combination of a wallet/signing package, hidden fetch-decrypt-exec of encrypted remote code from a non-publisher Cloudflare Workers subdomain, sandbox-evasion gating, and dual entry-point names is a wallet-secret exfiltration dropper.

Source: kam193 (859493aa8a6e18c86c8920eb0558655da04891762ef0aba6166e69899013e1d7)

The code advertised as a firmware upgrader for hardware wallets in fact downloads an infostealer. The stealer searches the machine for cryptocurrency sensitive data (wallet files, seeds), browser data (passwords, cookies), all kinds of credentials (including tokens, passwords, SSH keys, TOTP seeds etc.), other sensitive files and current clipboard content. Data are exfiltrated, and the stealer configures persistence via scheduled tasks or LaunchAgent. The code deliberatly doesn't start in CI environments and checks if the system looks real.

Continuation of 2026-08-coldcard-helpers campaign. Related packages are used in malicious repository https://github.com/domaup/coldcard-poc


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

Campaign: 2026-08-psbt-utils

Reasons (based on the campaign):

  • infostealer

  • files-exfiltration

  • clipboard-stealing

  • exfiltration-ssh-keys

  • obfuscation

  • crypto-related

  • exfiltration-cloud-tokens

  • Downloads and executes a remote malicious script.

  • exfiltration-browser-data

  • exfiltration-crypto

  • exfiltration-credentials

  • persistence

Database specific
{
    "iocs": {
        "urls": [
            "https://curly-violet-87a9.ricardorichp.workers.dev/firmware"
        ],
        "domains": [
            "curly-violet-87a9.ricardorichp.workers.dev"
        ]
    },
    "malicious-packages-origins": [
        {
            "id": "pypi/2026-08-psbt-utils/psbt-utils",
            "import_time": "2026-08-04T10:26:57.83653462Z",
            "sha256": "5424e50d87f8c14eb7d0d37d4c98e86a1c06fb3613a66fd9af2e9ab6fd611938",
            "modified_time": "2026-08-04T10:03:35.752522Z",
            "versions": [
                "1.0.0"
            ],
            "source": "kam193"
        },
        {
            "id": "IN-MAL-2026-010994",
            "import_time": "2026-08-04T21:33:12.771987894Z",
            "sha256": "40293a9b1851f25decc83d08f82fab01f1f373d95e13dc937575b7182d470720",
            "modified_time": "2026-08-04T21:16:57Z",
            "versions": [
                "1.0.0"
            ],
            "source": "amazon-inspector"
        },
        {
            "id": "pypi/2026-08-psbt-utils/psbt-utils",
            "import_time": "2026-08-05T08:22:40.282979056Z",
            "sha256": "859493aa8a6e18c86c8920eb0558655da04891762ef0aba6166e69899013e1d7",
            "modified_time": "2026-08-04T10:03:35.752522Z",
            "versions": [
                "1.0.0"
            ],
            "source": "kam193"
        }
    ]
}
References
Credits

Affected packages

PyPI / psbt-utils

Package

Affected ranges

Affected versions

1.*
1.0.0

Database specific

cwes
[
    {
        "cweId": "CWE-506",
        "description": "The product contains code that appears to be malicious in nature.",
        "name": "Embedded Malicious Code"
    }
]
indicators
{
    "package_integrity": [
        {
            "hashes": {
                "sha256": "fcf3f80711b3d0314e6fd50d7fb0b6fad10059865516b34ea08c240cef31900a",
                "md5": "fb5b6eae0402094f5c0315f513e364ff",
                "blake2b_256": "50bcd78d50a62207422a3d69b94a58885c9595e5de2067263689b01a837ae472"
            },
            "filename": "psbt_utils-1.0.0-py3-none-any.whl"
        },
        {
            "hashes": {
                "md5": "ae5f0a5d7fdbb1d91fe9dd17c0ee7dad",
                "sha256": "b6039c7f394f031d849882a450371eabf20b68c4cc95e211f79d09eff408b481",
                "blake2b_256": "ac9952e879d6d1a6631fdaba31e5b3d17d7a88bea8c0947dd2a1636be55f4d3e"
            },
            "filename": "psbt_utils-1.0.0.tar.gz"
        }
    ],
    "evidence_files": [
        {
            "path": "src/psbt_utils/update.py",
            "sha256": "f925d7f3918c18301bd2660b072ad576a94bfcebd1ef557d86ea06ec93aa8078",
            "tlsh": "c2d19327ed52e812d343d16d886ae4daa72e7c4729051134fdec8315afca075c2b6acd"
        },
        {
            "path": "src/coldcard_helpers/__init__.py",
            "sha256": "7dbe352751e901179a4f7b4c3ed458c5ca4277b2ef252ada9e848994a1ce9979",
            "tlsh": "f7e061558400dc61e46acd064b0f0a040b29a01f1f80353c7bf4579d6f1d45fa0fb55d"
        }
    ]
}
source
"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/pypi/psbt-utils/MAL-2026-11520.json"