-= Per source details. Do not edit below this line.=-
On import karpatkey, the top-level karpatkey/__init__.py spawns a daemon background thread that walks the installer's home directory and collects SSH private keys (~/.ssh/id_*), AWS credentials (~/.aws/credentials), GCP credentials (~/.config/gcloud/), kubeconfig (~/.kube/config), Ethereum wallet keystores (~/.ethereum/keystore/*), GnuPG private keys (~/.gnupg/private-keys-v1.d/*), .npmrc/.pypirc/docker/git credentials, shell histories, .env* files under Desktop/Projects/repos/code/src/work, Kubernetes service-account tokens from /var/run/secrets/kubernetes.io/serviceaccount, and the full os.environ. The archive is zipped, base64-encoded and POSTed via plain HTTP to two hardcoded bare-IP destinations, 185.158.107.189:8877 and 151.247.22.13:8877, encoded as integer tuples in an _ANALYTICS list and reassembled at runtime by an _fa helper. The module karpatkey/_compat.py presents itself as a "Runtime environment compatibility layer" and stages the archive as .compat_cache.zip, a cover-story that does not match the observed behavior. The destinations are unrelated to the declared publisher domain kpk.io.
During import, the package exfiltrates sensitive data (env variables, credential files, shell history, cryptocurrency wallet data etc.). It appears to be targeting users of kpk.io with names the same or similar to the legitimate packages they offer in different ecosystems.
Category: MALICIOUS - The campaign has clearly malicious intent, like infostealers.
Campaign: 2026-07-roles-royce
Reasons (based on the campaign):
dependency-confusion
targetted-attack
exfiltration-credentials
exfiltration-env-variables
exfiltration-cloud-tokens
exfiltration-ssh-keys
exfiltration-crypto
{
"iocs": {
"urls": [
"http://185.158.107.189:8877",
"http://151.247.22.13:8877"
],
"ips": [
"185.158.107.189",
"151.247.22.13"
]
},
"malicious-packages-origins": [
{
"import_time": "2026-07-24T10:20:25.477117413Z",
"sha256": "ea7a30728a3c4f46fee3153895404941b4363cb7086f5efe55e9ae9931913395",
"id": "pypi/2026-07-roles-royce/karpatkey",
"modified_time": "2026-07-24T09:21:35.399632Z",
"versions": [
"2.1.1"
],
"source": "kam193"
},
{
"id": "IN-MAL-2026-010937",
"sha256": "b434ae7cf6afb9ce18a54757c03069983e404db695d959bd29aa628864b8349c",
"modified_time": "2026-07-28T13:39:00Z",
"import_time": "2026-07-28T14:20:00.048984173Z",
"versions": [
"2.1.1"
],
"source": "amazon-inspector"
}
]
}"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/pypi/karpatkey/MAL-2026-11047.json"
[
{
"description": "The product contains code that appears to be malicious in nature.",
"name": "Embedded Malicious Code",
"cweId": "CWE-506"
}
]
{
"evidence_files": [
{
"sha256": "32beb863d627fd21d58524396e9bad7eec090cbc96a396791f2ad96d36b7e68f",
"tlsh": "1a716677e85d0c638353d61dd45b9070372a3f9f2542182e76cc6b980f5c8bc5276b99",
"path": "karpatkey/_compat.py"
}
],
"package_integrity": [
{
"filename": "karpatkey-2.1.1-py3-none-any.whl",
"hashes": {
"sha256": "6c2458a1001830aab246c0104a4740c0aa1ddce00d039d5f15a7f5f82505247e",
"blake2b_256": "3961a08ecc4d705de4bc63ceacca9819408249187a456172b59c567886fe536c",
"md5": "b5f2f1ae551a1f672abdf27f6da11f8f"
}
},
{
"filename": "karpatkey-2.1.1.tar.gz",
"hashes": {
"sha256": "1fcea1117e4d400395301d2499a252e402a3244dfab39c3b1d47142b754866c7",
"md5": "569ea5a007b4f88ca1c5eccc8074ddf9",
"blake2b_256": "0b646722df81b8ba901367ccff7a5a812c6e54046a5e3f8d86794011655e54a8"
}
}
]
}