{"id":"MAL-2026-13486","summary":"Malicious code in fastapii (PyPI)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (bf67e733322de0ce3d08269697e6ccd9460233319cadd5f97f05c8d1e855665a)\nfastapii 0.1.2 is a single-character typosquat of the popular fastapi package. Its setup.py registers a custom setuptools install cmdclass (LinuxInstall) whose post_install step decodes a base64-encoded payload (_HOOK_B64) and runs it via exec(compile(...)). On Linux, the decoded payload calls urllib.request.urlretrieve to fetch a binary from https://github.com/totti2188/8gp1Q7iZD3h4VW/releases/download/v1.3A/something into /tmp, chmods it to 0755, and launches it detached via subprocess.Popen with start_new_session=True. The GitHub account hosting the binary is unrelated to the package's declared identity, the fetch is unpinned and unverified (no hash or signature), and the Linux-only gate means the payload stays dormant on many developer laptops but fires in Linux CI and production. The shipped module is a stub named djangoo containing only a trivial hello() function, and PKG-INFO/README metadata ('HTTP client utilities', '# requestss') further obscure the package identity — the install-time dropper is the package's sole real behavior.\n\n## Source: kam193 (ccfc3dd07e620dc6bda1b28b4d8f77932ee217aff579270c0e0c74453e215943)\nPackage imitates name of a popula library. During installation, obfuscated code downloads a malicious executable and starts it. It then exfiltrates at least cryptocurrency wallet data, probably more.\n\n\n---\n\nCategory: MALICIOUS - The campaign has clearly malicious intent, like infostealers.\n\n\nCampaign: 2026-08-flasq\n\n\nReasons (based on the campaign):\n\n\n - typosquatting\n\n\n - The package overrides the install command in setup.py to execute malicious code during installation.\n\n\n - exfiltration-generic\n\n\n - Downloads and executes a remote executable.\n\n\n - obfuscation\n\n\n - exfiltration-crypto\n","modified":"2026-08-07T12:35:24.849436951Z","published":"2026-08-07T07:04:06Z","database_specific":{"iocs":{"ips":["193.70.34.101"],"urls":["https://github.com/totti2188/8gp1Q7iZD3h4VW/releases/download/v1.3A/something"]},"malicious-packages-origins":[{"source":"kam193","versions":["0.1.1","0.1.2","0.2.0","0.3.0"],"id":"pypi/2026-08-flasq/fastapii","import_time":"2026-08-07T07:35:19.069517191Z","modified_time":"2026-08-07T07:04:06.022771Z","sha256":"ccfc3dd07e620dc6bda1b28b4d8f77932ee217aff579270c0e0c74453e215943"},{"id":"pypi/2026-08-flasq/fastapii","import_time":"2026-08-07T08:57:13.347588921Z","modified_time":"2026-08-07T07:04:06.022771Z","sha256":"d076049fb705714b3379544119324a95831a1621c67f595a78a78e6d696c006d","source":"kam193","versions":["0.1.1","0.1.2","0.2.0","0.3.0"]},{"versions":["0.1.1"],"id":"IN-MAL-2026-016887","import_time":"2026-08-07T12:23:25.801241502Z","modified_time":"2026-08-07T12:13:03Z","sha256":"6436cfdbe89d8bb31eea95d858dd0a772b0fb0f5ebdbaf5fbbd77f0ae367fe85","source":"amazon-inspector"},{"modified_time":"2026-08-07T12:12:40Z","sha256":"671dc4cdeb2b54f33380b6274ba3c9b2fcc9a5819fcd12495882f384755f5806","source":"amazon-inspector","versions":["0.2.0"],"id":"IN-MAL-2026-016884","import_time":"2026-08-07T12:23:25.691505673Z"},{"sha256":"a1b02dcc696bd9a90f0ba56bf7ffded7fe309595f51f7f65f3b16e102c121fc0","source":"amazon-inspector","versions":["0.3.0"],"id":"IN-MAL-2026-016881","import_time":"2026-08-07T12:23:25.560611327Z","modified_time":"2026-08-07T12:12:12Z"},{"versions":["0.1.2"],"id":"IN-MAL-2026-016885","import_time":"2026-08-07T12:23:25.71920404Z","modified_time":"2026-08-07T12:12:47Z","sha256":"bf67e733322de0ce3d08269697e6ccd9460233319cadd5f97f05c8d1e855665a","source":"amazon-inspector"}]},"references":[{"type":"EVIDENCE","url":"https://www.virustotal.com/gui/file/425f5336182e359211b5d751786d2ce1d31a673ea9c82107358a888803742649/detection"},{"type":"WEB","url":"https://bad-packages.kam193.eu/pypi/package/fastapii"},{"type":"EVIDENCE","url":"https://tria.ge/260807-fkycrazzg1/behavioral1"},{"type":"PACKAGE","url":"https://pypi.org/project/fastapii/0.1.1/"},{"type":"PACKAGE","url":"https://pypi.org/project/fastapii/0.2.0/"},{"type":"PACKAGE","url":"https://pypi.org/project/fastapii/0.3.0/"},{"type":"PACKAGE","url":"https://pypi.org/project/fastapii/0.1.2/"}],"affected":[{"package":{"name":"fastapii","ecosystem":"PyPI","purl":"pkg:pypi/fastapii"},"versions":["0.1.1","0.1.2","0.2.0","0.3.0"],"database_specific":{"cwes":[{"name":"Embedded Malicious Code","cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature."},{"cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code"},{"cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code"},{"description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code","cweId":"CWE-506"}],"indicators":{"evidence_files":[{"path":"setup.py","sha256":"1f73bbeef78e8cd5df29ed6ae14b72b10041b327c80d89f04d7db821cead4e6d","tlsh":"d521865b8e2510b06c18c7845843411f162baae1ac2074e4beed33642bcd249ca7f0d7"}],"package_integrity":[{"hashes":{"sha256":"fd7abb149a96a8f20ed5fae569216457101c57ac29b93a527094ebaae773e927","blake2b_256":"df424bf9267f69773153fcd00a705471ed0929c316a8b2c22da3ee093e38a8a2","md5":"5f7dee45871adec2bf13ce27bf519382"},"filename":"fastapii-0.1.1.tar.gz"}]},"source":"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/pypi/fastapii/MAL-2026-13486.json"}}],"schema_version":"1.8.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":"REPORTER"}]}