MAL-2026-5295
Vulnerability from ossf_malicious_packages
Published
2026-06-06 06:13
Modified
2026-06-12 19:46
Summary
Malicious code in coolbox (PyPI)
Details

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

Source: amazon-inspector (c55bfdad112134e980af7568a9138be1e4b940f7bfbeebad2b0f85d9337a0f44)

The wheel installs coolbox-setup.pth, a Python path-configuration file that Python auto-loads at every interpreter startup (any python invocation system-wide, not just import coolbox). The.pth uses exec() on an obfuscated string that downloads the Bun JavaScript runtime from https://github.com/oven-sh/bun/releases/download/bun-v1.3.13/bun-{platform}-{arch}.zip to /tmp/b/bun, chmods it executable, and runs a glob-located _index.js sibling under it. A .bun_ran sentinel file gates one-shot execution. CoolBox is advertised as a Python genomics/Jupyter visualization library (GangCaoLab, BMC Bioinformatics 2021) and has no legitimate need to install or execute a JavaScript runtime. The release also shows hijack fingerprints: coolbox/__init__.py declares __version__ = '0.4.0' while the dist-info METADATA declares Version: 0.4.1, and RECORD additively references the prior coolbox-0.4.0.dist-info/ alongside the new coolbox-setup.pth — consistent with a malicious republish layered on top of the legitimate prior release. The _index.js payload is not listed in RECORD, indicating it is staged from another source. Installer harm: any system that installs this wheel will execute attacker-controlled JavaScript under the Bun runtime on every subsequent python startup, with the user's privileges.

Source: kam193 (5c2dc2f03691017c67f2ef9805c4974416d935298b4748b033bfb7f487ede251)

Versions 0.4.1, 0.4.2 were compromised.

Compromised packages start an obfuscated infostealer. The infostealer is a heavily obfuscated JavaScript code executed using Bun runtime on Python startup. It collectes all kinds of sensitive data, including API keys, credentials to package repositories, cryptocurrency assets, password manager data. Infostealer actively queries online services to collect additional secrets as well as attempts to gain persistence and spread further by publishing infected packages using collected credentials. Data are exfiltrated likely using Github. The code seems to threaten to wipe the user's data if it detects invalid GitHub tokens. Cleanup should be done with caution.

It seems to be related to the recent Mini Shai Hulud campaign.


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

Campaign: 2026-06-compr-woodpecker

Reasons (based on the campaign):

  • compromised-package

  • exfiltration-env-variables

  • exfiltration-cloud-tokens

  • exfiltration-credentials

  • abuses-pth

  • obfuscation

  • infostealer

  • The package contains code to detect if it is running in a sandbox environment.

  • exfiltration-crypto

  • files-exfiltration

  • destructive-actions

CWE
  • CWE-506 - The product contains code that appears to be malicious in nature.

{
  "affected": [
    {
      "database_specific": {
        "cwes": [
          {
            "cweId": "CWE-506",
            "description": "The product contains code that appears to be malicious in nature.",
            "name": "Embedded Malicious Code"
          }
        ],
        "indicators": {
          "evidence_files": [
            {
              "path": "coolbox-setup.pth",
              "sha256": "c539766062555d47716f8432e73adbe3a0c0c954a0b6c4005017a668975e275c",
              "tlsh": "4911c02e429385b0d975d646830b19f4afdb8ce28fc79506c8d8d4c1a7b2e50e3b7684"
            },
            {
              "path": "coolbox-0.4.1.dist-info/RECORD",
              "sha256": "5a956a1a5bd6e3f07f3c148daba57974d2e6a7a4b2d7c008770eb45399cd6343",
              "tlsh": "6bf1e999695ae08e37830a92ab414bb53f654617f0c3345cab008739f3cd7fad93e646"
            }
          ],
          "package_integrity": [
            {
              "filename": "coolbox-0.4.1-py3-none-any.whl",
              "hashes": {
                "blake2b_256": "9f02a14a518d8d7732b6cf4b6bf3eb6c0e9f047cfc1596ef56a15541d6350206",
                "md5": "5ca17f568e14c68bbd1df8357fbe8964",
                "sha256": "676713804352b10f813c3371abffaac2ae670a53dbd924ebaae2e3b190b91eae"
              }
            }
          ]
        }
      },
      "package": {
        "ecosystem": "PyPI",
        "name": "coolbox"
      },
      "versions": [
        "0.4.1",
        "0.4.2"
      ]
    }
  ],
  "credits": [
    {
      "contact": [
        "inspector-research@amazon.com"
      ],
      "name": "Amazon Inspector",
      "type": "FINDER"
    },
    {
      "contact": [
        "https://github.com/kam193",
        "https://bad-packages.kam193.eu/"
      ],
      "name": "Kamil Ma\u0144kowski (kam193)",
      "type": "REPORTER"
    }
  ],
  "database_specific": {
    "malicious-packages-origins": [
      {
        "id": "pypi/2026-06-compr-woodpecker/coolbox",
        "import_time": "2026-06-07T15:57:34.745836928Z",
        "modified_time": "2026-06-06T06:13:57Z",
        "sha256": "5c2dc2f03691017c67f2ef9805c4974416d935298b4748b033bfb7f487ede251",
        "source": "kam193",
        "versions": [
          "0.4.1",
          "0.4.2"
        ]
      },
      {
        "id": "pypi/2026-06-compr-woodpecker/coolbox",
        "import_time": "2026-06-08T11:41:02.516930226Z",
        "modified_time": "2026-06-06T06:13:57Z",
        "sha256": "f0d5fde6bb63a9bdd47ede4cdf19e54d636016848ad9e780a0db4d96138c2d6f",
        "source": "kam193",
        "versions": [
          "0.4.1",
          "0.4.2"
        ]
      },
      {
        "id": "pypi/2026-06-compr-woodpecker/coolbox",
        "import_time": "2026-06-08T19:19:19.173271277Z",
        "modified_time": "2026-06-07T15:36:23Z",
        "sha256": "6120318ad0beb72f5fe01fbceb6a2bb29b2c93c277b4a5fe2b5d7f148bcd30d8",
        "source": "kam193",
        "versions": [
          "0.4.1",
          "0.4.2"
        ]
      },
      {
        "id": "pypi/2026-06-compr-woodpecker/coolbox",
        "import_time": "2026-06-09T07:48:29.633986211Z",
        "modified_time": "2026-06-07T15:36:23Z",
        "sha256": "da9448cdfb3593bc9434cbc09686ea2d8bc73f5b531e45d13229949e14aadbf8",
        "source": "kam193",
        "versions": [
          "0.4.1",
          "0.4.2"
        ]
      },
      {
        "id": "IN-MAL-2026-005804",
        "import_time": "2026-06-12T19:43:35.178454373Z",
        "modified_time": "2026-06-12T19:02:16Z",
        "sha256": "c55bfdad112134e980af7568a9138be1e4b940f7bfbeebad2b0f85d9337a0f44",
        "source": "amazon-inspector",
        "versions": [
          "0.4.1"
        ]
      }
    ]
  },
  "details": "\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (c55bfdad112134e980af7568a9138be1e4b940f7bfbeebad2b0f85d9337a0f44)\nThe wheel installs `coolbox-setup.pth`, a Python path-configuration file that Python auto-loads at every interpreter startup (any `python` invocation system-wide, not just `import coolbox`). The.pth uses `exec()` on an obfuscated string that downloads the Bun JavaScript runtime from `https://github.com/oven-sh/bun/releases/download/bun-v1.3.13/bun-{platform}-{arch}.zip` to `/tmp/b/bun`, chmods it executable, and runs a glob-located `_index.js` sibling under it. A `.bun_ran` sentinel file gates one-shot execution. CoolBox is advertised as a Python genomics/Jupyter visualization library (GangCaoLab, BMC Bioinformatics 2021) and has no legitimate need to install or execute a JavaScript runtime. The release also shows hijack fingerprints: `coolbox/__init__.py` declares `__version__ = \u00270.4.0\u0027` while the dist-info METADATA declares `Version: 0.4.1`, and RECORD additively references the prior `coolbox-0.4.0.dist-info/` alongside the new `coolbox-setup.pth` \u2014 consistent with a malicious republish layered on top of the legitimate prior release. The `_index.js` payload is not listed in RECORD, indicating it is staged from another source. Installer harm: any system that installs this wheel will execute attacker-controlled JavaScript under the Bun runtime on every subsequent `python` startup, with the user\u0027s privileges.\n\n## Source: kam193 (5c2dc2f03691017c67f2ef9805c4974416d935298b4748b033bfb7f487ede251)\nVersions 0.4.1, 0.4.2 were compromised.\n\n\nCompromised packages start an obfuscated infostealer. The infostealer is a heavily obfuscated JavaScript code executed using Bun runtime on Python startup. It collectes all kinds of sensitive data, including API keys, credentials to package repositories, cryptocurrency assets, password manager data. Infostealer actively queries online services to collect additional secrets as well as attempts to gain persistence and spread further by publishing infected packages using collected credentials. Data are exfiltrated likely using Github. The code seems to threaten to wipe the user\u0027s data if it detects invalid GitHub tokens. Cleanup should be done with caution.\n\nIt seems to be related to the recent Mini Shai Hulud campaign.\n\n\n---\n\nCategory: MALICIOUS - The campaign has clearly malicious intent, like infostealers.\n\n\nCampaign: 2026-06-compr-woodpecker\n\n\nReasons (based on the campaign):\n\n\n - compromised-package\n\n\n - exfiltration-env-variables\n\n\n - exfiltration-cloud-tokens\n\n\n - exfiltration-credentials\n\n\n - abuses-pth\n\n\n - obfuscation\n\n\n - infostealer\n\n\n - The package contains code to detect if it is running in a sandbox environment.\n\n\n - exfiltration-crypto\n\n\n - files-exfiltration\n\n\n - destructive-actions\n",
  "id": "MAL-2026-5295",
  "modified": "2026-06-12T19:46:18Z",
  "published": "2026-06-06T06:13:57Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://socket.dev/blog/mini-shai-hulud-campaign-hits-red-hat-cloud-services-npm-packages"
    },
    {
      "type": "WEB",
      "url": "https://bad-packages.kam193.eu/pypi/campaign/2026-06-compr-woodpecker"
    },
    {
      "type": "WEB",
      "url": "https://socket.dev/blog/shai-hulud-descends-to-hades-miasma-pypi-wave"
    },
    {
      "type": "WEB",
      "url": "https://o3.security/blog/pypi-supply-chain-attack-pth-file-miasma"
    },
    {
      "type": "WEB",
      "url": "https://socket.dev/blog/mini-shai-hulud-miasma-and-hades-worms-target-bioinformatics-and-mcp-developers-via-malicious"
    },
    {
      "type": "PACKAGE",
      "url": "https://pypi.org/project/coolbox/0.4.1/"
    }
  ],
  "schema_version": "1.7.4",
  "summary": "Malicious code in coolbox (PyPI)"
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.

Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…