{"id":"MAL-2025-2950","summary":"Malicious code in credential-python-sdk (PyPI)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: kam193 (6c6598ac9c321af3b0526ddceb5ffc6e78d593e0c3e6bdd259b06c0792705cc6)\nThis campaign is built from two parts:\n1) packages named like time-check-server, snapshot-photo contain an innocent-looking code that sends \"date\" to a remote server,\n2) packages named like alicloud-client are clones of legit aliyun-python-sdk-core package, with a small change in the client.py code, where it imports the time-check-server and calls it, but instead of a date, the credentials to the cloud are exfiltrated. There are also variations with AWS clients\n\nApparently, the campaign started at least 2 years ago with the snapshot-photo package containing the same functionality as the newer time-check-server (see https://github.com/pypi-data/pypi-mirror-238/blob/code/packages/snapshot-photo/snapshot_photo-0.0.3-py3-none-any.whl/snapshot_photo/date_format.py).\n\n\n---\n\nCategory: MALICIOUS - The campaign has clearly malicious intent, like infostealers.\n\n\nCampaign: 2025-02-alicloud-client\n\n\nReasons (based on the campaign):\n\n\n - clones-real-package\n\n\n - action-hidden-in-lib-usage\n\n\n - The malicious code is intentionally included in a dependency of the package\n\n\n - exfiltration-cloud-tokens\n","aliases":["SNYK-PYTHON-CREDENTIALPYTHONSDK-12201349"],"modified":"2026-03-19T12:52:03.135679Z","published":"2025-02-25T18:18:21Z","database_specific":{"iocs":{"domains":["checktimeserver.org","aliyun-sdk-requests.xyz"],"urls":["https://api.checktimeserver.org/","https://api.aliyun-sdk-requests.xyz/"]},"malicious-packages-origins":[{"id":"RLMA-2025-01948","import_time":"2025-03-31T07:07:05.109232043Z","modified_time":"2025-03-28T13:05:30Z","sha256":"98c6376a072729cd054d1650147ae1f38ba5ebe4182ccabc085ff7689a392f5e","source":"reversing-labs","versions":["0.0.3"]},{"id":"RLUA-2025-04755","import_time":"2025-09-26T11:06:10.062827406Z","modified_time":"2025-09-26T09:13:51Z","sha256":"ccb75be9c570fba4a5794bea20205e89e2d4e5f8d24d654e0cb08c6729ee1435","source":"reversing-labs"},{"modified_time":"2025-02-25T18:18:21Z","ranges":[{"events":[{"introduced":"0"}],"type":"ECOSYSTEM"}],"sha256":"ac81bbfc5a381702150076db0a7049386690e545f3fede3d4247fc6deb4b331b","source":"kam193","id":"pypi/2025-02-alicloud-client/credential-python-sdk","import_time":"2025-12-02T22:30:55.073490315Z"},{"source":"kam193","id":"pypi/2025-02-alicloud-client/credential-python-sdk","import_time":"2025-12-02T23:07:18.083452712Z","modified_time":"2025-02-25T18:18:21Z","ranges":[{"events":[{"introduced":"0"}],"type":"ECOSYSTEM"}],"sha256":"6c6598ac9c321af3b0526ddceb5ffc6e78d593e0c3e6bdd259b06c0792705cc6"},{"import_time":"2025-12-10T21:38:57.375200862Z","modified_time":"2025-02-25T18:18:21Z","sha256":"85b5099f9045b317522307daffade9a3a513dbb8ab32822650127dc4153a10c0","source":"kam193","versions":["0.0.3"],"id":"pypi/2025-02-alicloud-client/credential-python-sdk"},{"id":"pypi/2025-02-alicloud-client/credential-python-sdk","import_time":"2026-01-30T19:43:58.38132399Z","modified_time":"2025-02-25T18:18:21Z","sha256":"7331b7ac44dd9fdd42c32d504cb93a5b312525d3c1377d5e5f9d4cdd4a9ecaf8","source":"kam193","versions":["0.0.3"]},{"id":"RLUA-2026-00227","import_time":"2026-03-19T12:19:36.426049782Z","modified_time":"2026-03-18T12:12:52Z","sha256":"47a2cddf6cc4f54b884fd20b538573846712a9a95bd112b853c89c5b5b024b52","source":"reversing-labs"}]},"references":[{"type":"WEB","url":"https://x.com/ReversingLabs/status/1900198602242204003"},{"type":"ADVISORY","url":"https://security.snyk.io/vuln/SNYK-PYTHON-CREDENTIALPYTHONSDK-12201349"},{"type":"WEB","url":"https://github.com/pypi-data/pypi-mirror-238/blob/code/packages/snapshot-photo/snapshot_photo-0.0.3-py3-none-any.whl/snapshot_photo/date_format.py"},{"type":"WEB","url":"https://thehackernews.com/2025/03/malicious-pypi-packages-stole-cloud.html"},{"type":"WEB","url":"https://bad-packages.kam193.eu/pypi/package/credential-python-sdk"},{"type":"ARTICLE","url":"https://thehackernews.com/2025/03/malicious-pypi-packages-stole-cloud.html"}],"affected":[{"package":{"name":"credential-python-sdk","ecosystem":"PyPI","purl":"pkg:pypi/credential-python-sdk"},"versions":["0.0.3"],"database_specific":{"source":"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/pypi/credential-python-sdk/MAL-2025-2950.json"}}],"schema_version":"1.7.5","credits":[{"name":"Kamil Mańkowski (kam193)","contact":["https://github.com/kam193","https://bad-packages.kam193.eu/"]},{"name":"Kamil Mańkowski (kam193)","contact":["https://github.com/kam193","https://bad-packages.kam193.eu/"],"type":"ANALYST"},{"name":"ReversingLabs","contact":["https://www.reversinglabs.com"],"type":"FINDER"}]}