Malicious package · PyPI
Malicious code in idnna (PyPI)
0.1.10.1.20.2.00.3.0No safe version. Remove it.What it does
The package publishes under a name that closely resembles the widely-used idna package and advertises itself as 'HTTP client utilities', but the only importable module is djangoo containing a trivial hello() function. setup.py registers a custom install cmdclass (LinuxInstall) whose post-install step base64-decodes a hidden Python payload stored in _HOOK_B64 and executes it via exec(compile(...)). On Linux, the decoded payload uses urlretrieve to download an opaque binary named something from https://github.com/totti2188/8gp1Q7iZD3h4VW/releases/download/v1.3A/something — an unrelated personal GitHub account whose repository has no connection to the package's stated purpose — chmods it to 0o755, and spawns it detached via Popen. The download destination is not publisher-matched, the fetched artifact is unpinned by hash, and the payload is obfuscated to evade casual review. This fires automatically on pip install of the sdist.
Reported by kam193 Package 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.
No fix · Remove and contain
pip uninstall idnnaSources