MAL-2025-191784Malicious code in loquru (PyPI)
| Ecosystem | Package | Version |
|---|---|---|
| PyPI | loquru | 0.7.3 |
{"modified":"2025-12-11T09:27:53Z","published":"2025-08-01T13:47:41Z","schema_version":"1.7.4","id":"MAL-2025-191784","summary":"Malicious code in loquru (PyPI)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: kam193 (a98209ec0f506986521ebd7b24de4f266f6bb61aba50f2dc511c391f1037848b)\nIt's a clone of \"loguru\" package which on import loads a second-stage script from loguru[.]guru. This makes a few checks and downloads the next stage, which is a code obfuscated with PyArmor with unclear behaviour.\n\nThe way the malicious code has been embedded could be called a \"sophisticated\" threat. The code is in the _logger.py in two places: the payload in L2242 as a long string constraint of only whitespaces, which are then transformed into bits and bytes, and later compiled and executed using \"types.FunctionType\" during initialisation of Core class.\n\n\n---\n\nCategory: MALICIOUS - The campaign has clearly malicious intent, like infostealers.\n\n\nCampaign: 2025-07-loquru\n\n\nReasons (based on the campaign):\n\n\n - typosquatting\n\n\n - obfuscation\n\n\n - clones-real-package\n\n\n - Downloads and executes a remote malicious script.\n","affected":[{"package":{"ecosystem":"PyPI","name":"loquru"},"versions":["0.7.3"]}],"references":[{"type":"WEB","url":"https://github.com/Delgan/loguru/issues/1363"},{"type":"WEB","url":"https://bad-packages.kam193.eu/pypi/package/loquru"}],"credits":[{"name":"Kamil Mańkowski (kam193)","contact":["https://github.com/kam193","https://bad-packages.kam193.eu/"]},{"name":"Kamil Mańkowski (kam193)","type":"REPORTER","contact":["https://github.com/kam193","https://bad-packages.kam193.eu/"]}],"database_specific":{"iocs":{"domains":["loguru.guru"],"urls":["https://loguru.guru/version/is_match_revision","https://loguru.guru/version/code"]},"malicious-packages-origins":[{"source":"kam193","sha256":"641cc2cb716a258c01b21b9d995e1352779eecf22663d8101ac7e946d362d96b","import_time":"2025-12-02T22:30:55.317137131Z","id":"pypi/2025-07-loquru/loquru","modified_time":"2025-08-01T13:47:41.367157Z","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}]},{"source":"kam193","sha256":"a98209ec0f506986521ebd7b24de4f266f6bb61aba50f2dc511c391f1037848b","import_time":"2025-12-02T23:07:18.343821479Z","id":"pypi/2025-07-loquru/loquru","modified_time":"2025-08-01T13:47:41.367157Z","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}]},{"source":"kam193","sha256":"45d6403aae40fb99fdee2c26853d75d2c1616fccb919fb8b28988ec5d535bada","import_time":"2025-12-10T21:38:57.577061693Z","id":"pypi/2025-07-loquru/loquru","modified_time":"2025-08-01T13:47:41.367157Z","versions":["0.7.3"]}]}}数据来源:OpenSSF Malicious Packages · Apache-2.0