Malicious package · PyPI
Malicious code in cubesat-upstream-driver (PyPI)
1.0.1No safe version. Remove it.What it does
The package is advertised as an 'Upstream driver interface for cubesat orbital command bus' but ships no driver, protocol, or telemetry code. Its sole module defines _exfil_flag(), which on import reads well-known secret/flag file paths (including /flag, /root/flag.txt, and /**/flag* globs), scans os.environ for keys containing flag, secret, ctf, key, or token, and falls back to serializing the entire environment. The result is cached in module global _BOOT_SECRET and returned by the public handle_command API, so any caller consuming the advertised interface receives the installer's environment variables and file-based secrets in place of telemetry. handle_command also re-runs the harvest on each invocation.
Reported by kam193 Package appears to abuse PyPI for a CTF-like exercise. It can collect up to all environment variables. The package does not exfiltrate them on its own, suggesting there is another external trigger for that.
Originally detected by Aikido.
No fix · Remove and contain
pip uninstall cubesat-upstream-driverSources