{"id":"MAL-2026-16133","summary":"Malicious code in langgrap (PyPI)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (b11e221d911cf4904a1508f284da0ac0eb17a88e91dadb6dc60ef3bc5d547380)\nPackage name `langgrap` is a one-character deletion of `langgraph`, and `__init__.py` re-exports `from langgraph import *` so imports appear to succeed. The installed `langgrap-setup.pth` file contains an `import...; exec(...)` line that Python auto-executes on every interpreter startup (including non-import invocations like `python -V`). The exec payload is XOR(0x5A)+base64 obfuscated and, when decoded, uses curl to download `http://167.86.108.190:7788/lurves-agent.py` to `/tmp/.a` and runs it via `python3 /tmp/.a --daemon`, guarded by a `/tmp/.lurves-planted` marker. The.pth file additionally contains cover-story comments falsely instructing scanners to classify it as clean. This delivers full remote code execution on the installer's host from an unpinned, unverified script fetched over plain HTTP from a bare IP.\n\n## Source: kam193 (80943fa86afe1c0cd0b657339f2125c48de0ca3cf9848b895e2e60ea744b1db9)\nTyposquatting package planting a malicious PTH file that during loading Python downloads the next stage. It then hides its existence, downloads the further stage and clears logs. The next stage exfiltrates sensitive data (SSH keys, cloud credentials), ensures persistence and plants a cryptominer. The original PTH file contains a simple attempt to discourage analysis via AI agents.\n\n\n---\n\nCategory: MALICIOUS - The campaign has clearly malicious intent, like infostealers.\n\n\nCampaign: 2026-09-openaii\n\n\nReasons (based on the campaign):\n\n\n - Downloads and executes a remote malicious script.\n\n\n - obfuscation\n\n\n - abuses-pth\n\n\n - cryptominer\n\n\n - infostealer\n\n\n - exfiltration-credentials\n\n\n - files-exfiltration\n\n\n - exfiltration-ssh-keys\n\n\n - persistence\n\n\n - typosquatting\n\n\n - covering-tracks\n","modified":"2026-09-11T22:30:03.740407574Z","published":"2026-09-11T21:00:21Z","database_specific":{"iocs":{"ips":["167.86.108.190"],"urls":["http://167.86.108.190:7788/stage1.py","http://167.86.108.190:7788/.lurves-agent.py"]},"malicious-packages-origins":[{"id":"pypi/2026-09-openaii/langgrap","import_time":"2026-09-11T21:15:39.522229484Z","modified_time":"2026-09-11T21:00:21.443995Z","sha256":"80943fa86afe1c0cd0b657339f2125c48de0ca3cf9848b895e2e60ea744b1db9","source":"kam193","versions":["0.2.45"]},{"import_time":"2026-09-11T22:16:21.632857169Z","modified_time":"2026-09-11T22:14:56Z","sha256":"b11e221d911cf4904a1508f284da0ac0eb17a88e91dadb6dc60ef3bc5d547380","source":"amazon-inspector","versions":["0.2.45"],"id":"IN-MAL-2026-020006"}]},"references":[{"type":"WEB","url":"https://bad-packages.kam193.eu/pypi/package/langgrap"},{"type":"PACKAGE","url":"https://pypi.org/project/langgrap/0.2.45/"}],"affected":[{"package":{"name":"langgrap","ecosystem":"PyPI","purl":"pkg:pypi/langgrap"},"versions":["0.2.45"],"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":[{"filename":"langgrap-0.2.45-py3-none-any.whl","hashes":{"blake2b_256":"a2c33e1ede40d982f429cc66dd2c4555a25052a98d2b32e574c230058d9fd10c","md5":"71b1bf45ef8c49b925889ea491b38254","sha256":"29b5814d6c55d03ff7bcaf78354725b390f64f30cd6feaa93db4ab752dfc026d"}}],"evidence_files":[{"path":"langgrap-0.2.45.data/purelib/langgrap-setup.pth","sha256":"6228ded2ea439fc1a2970e212215d761c8d1c65ea59b6adb2085d579efd11bdd","tlsh":"8001ca97db45419ac43005d1333a11b36e3b90fdc6111a8c44bc5ad0331213823a3c39"},{"tlsh":"00b012214c0311e764d6c28c003dc0a041337c03d912d059e9d073100bcb800d410015","path":"langgrap/__init__.py","sha256":"ea17f5dba7bf4eac368870ab9e3ce10eb1d5afebcbd72efc6901e61740a9d1d9"}]},"source":"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/pypi/langgrap/MAL-2026-16133.json"}}],"schema_version":"1.9.0","credits":[{"name":"Amazon Inspector","contact":["inspector-research@amazon.com"],"type":"FINDER"},{"name":"Kamil Mańkowski (kam193)","contact":["https://github.com/kam193","https://bad-packages.kam193.eu/"],"type":"ANALYST"}]}