{"id":"MAL-2026-5303","summary":"Malicious code in rlask (PyPI)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (89a034f9ba4356799034d728884eccecf5c53779d85280556419cda38e671a30)\nThe package name 'rlask' is a single-character edit of the popular 'flask' package. METADATA declares 'Maintainer-email: Pallets \u003ccontact@palletsprojects.com\u003e', and entry_points.txt registers 'flask=flask.cli:main' rather than an rlask-specific entry — indicating the distribution is a verbatim repackaging of Flask 3.1.x source while falsely advertising Pallets maintainership. The exported API (Flask, Blueprint, Config, request, session, etc.) mirrors Flask's surface. No exfiltration, install-time hooks, subprocess execution, credential reads, or outbound network I/O were observed in the shipped code. The risk is name confusion plus forged maintainer identity: a developer who mistypes 'pip install flask' as 'pip install rlask' receives a package that shadows the real Flask, controlled by an author who is not Pallets and could push a malicious update at any time. Routing to human review per the typosquat handling discipline — name-confusion judgments and impersonated-maintainer attributions should be confirmed by a human before publication.\n\n## Source: kam193 (baacd735e23c83962845507427fa53c89bdc2e8e0456dbbce6f00a91bf4fe002)\nTyposquatting package published from a compromised account with 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.\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","aliases":["PYSEC-2026-584"],"modified":"2026-07-09T23:02:07.751604479Z","published":"2026-06-08T07:53:50Z","database_specific":{"malicious-packages-origins":[{"id":"pypi/2026-06-compr-woodpecker/rlask","modified_time":"2026-06-08T07:53:50.973743Z","versions":["3.1.3","3.1.4","3.1.5","3.1.6","3.1.7"],"source":"kam193","sha256":"baacd735e23c83962845507427fa53c89bdc2e8e0456dbbce6f00a91bf4fe002","import_time":"2026-06-08T09:42:58.908884113Z"},{"versions":["3.1.3","3.1.4","3.1.5","3.1.6","3.1.7"],"source":"kam193","sha256":"4ca4516111fcaad3efadf2bf86fd3ae9c975315f7754183c797acabc1e6475d5","import_time":"2026-06-08T11:41:02.547347016Z","id":"pypi/2026-06-compr-woodpecker/rlask","modified_time":"2026-06-08T07:53:50.973743Z"},{"source":"kam193","sha256":"b4d4792bb2fb39439fe9b965c349935006fb237decae4f77ac833921d0d283f2","import_time":"2026-06-09T07:48:29.659983437Z","id":"pypi/2026-06-compr-woodpecker/rlask","modified_time":"2026-06-08T07:53:50.973743Z","versions":["3.1.3","3.1.4","3.1.5","3.1.6","3.1.7"]},{"id":"IN-MAL-2026-008934","modified_time":"2026-07-08T22:54:35Z","versions":["3.1.3"],"source":"amazon-inspector","sha256":"89a034f9ba4356799034d728884eccecf5c53779d85280556419cda38e671a30","import_time":"2026-07-08T23:27:54.23970498Z"},{"import_time":"2026-07-09T22:56:31.542760041Z","id":"IN-MAL-2026-009529","modified_time":"2026-07-09T22:08:50Z","versions":["3.1.6"],"source":"amazon-inspector","sha256":"85f60af8077caaaf6b2937b78c1a5f3a84b39241ff3739203f33eecfe45f01bf"},{"id":"IN-MAL-2026-009530","modified_time":"2026-07-09T22:09:00Z","versions":["3.1.7"],"source":"amazon-inspector","sha256":"92bd4b422853a33d38f179752632ef094a008292ff1f9a2168bd90fc385ee913","import_time":"2026-07-09T22:56:31.618047954Z"},{"source":"amazon-inspector","sha256":"cc98b863089370a92d8c73e09b64b8d3fc0a7a088d0e3c7e36b12d64bbff959a","import_time":"2026-07-09T22:56:31.413284917Z","id":"IN-MAL-2026-009528","modified_time":"2026-07-09T22:08:43Z","versions":["3.1.4"]},{"import_time":"2026-07-09T22:56:31.79247844Z","id":"IN-MAL-2026-009532","modified_time":"2026-07-09T22:09:19Z","versions":["3.1.5"],"source":"amazon-inspector","sha256":"d48cbada3f475ae3be28305c78ee0f626f83dcca7cb7de691e8083de964785d3"}]},"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/package/rlask"},{"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/rlask/3.1.3/"},{"type":"PACKAGE","url":"https://pypi.org/project/rlask/3.1.6/"},{"type":"PACKAGE","url":"https://pypi.org/project/rlask/3.1.7/"},{"type":"PACKAGE","url":"https://pypi.org/project/rlask/3.1.4/"},{"type":"PACKAGE","url":"https://pypi.org/project/rlask/3.1.5/"}],"affected":[{"package":{"name":"rlask","ecosystem":"PyPI","purl":"pkg:pypi/rlask"},"versions":["3.1.3","3.1.4","3.1.5","3.1.6","3.1.7"],"database_specific":{"indicators":{"package_integrity":[{"hashes":{"md5":"aed8e3d4318810529cb28a9a52aabe72","sha256":"1f655e86ef30e1709291409911177914917c4342cb7edbe9a30d3e74836a631d","blake2b_256":"09d02235ea9d2f50b2c06b192409c1658f16419b9bc1fc5203cc3c28f9213c43"},"filename":"rlask-3.1.3-py3-none-any.whl"}],"evidence_files":[{"path":"rlask-3.1.3.dist-info/METADATA","sha256":"9edae1da526276a4c0174bef36f1da900d07adea87ea42210a50cb3037bbb0df","tlsh":"ee5186ab87c06ba07fc783cb921cb4ede537825cfb8e50f5747480a426842a5827d23d"}]},"source":"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/pypi/rlask/MAL-2026-5303.json","cwes":[{"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"},{"description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code","cweId":"CWE-506"},{"cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code"},{"name":"Embedded Malicious Code","cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature."}]}}],"schema_version":"1.7.5","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"}]}