Malicious Code Vulnerability in statsapi Package - Exfiltration of Host Information

statsapi Updated 03 Dec 2025

Summary

25/10/2025
CRITICAL
No i
Critical
Not published

MAL-2025-191878: Malicious code in statsapi (PyPI). Affects statsapi versions 0.0.0 – 1.7.2. No fix is published. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The statsapi package, available on PyPI, is designed for statistical data handling in Python applications. However, it has been identified as malicious, containing code that exfiltrates sensitive information from the host system, such as IP addresses and usernames. This vulnerability poses a significant risk to users who unknowingly install the package, as it serves no legitimate purpose other than data theft.

Vulnerability Detail

The vulnerability originates from the package's design, where it overrides the install command in setup.py to execute malicious code during installation. This code is responsible for exfiltrating basic data from the system, leading to potential privacy breaches. The package has been categorized under PROBABLY_PENTEST, indicating it mimics typical penetration testing tools but carries a risk of data exposure.

How To Fix

This package is malicious. Remove it and rotate any credentials it could have accessed.

pip uninstall statsapi

If it arrived as a transitive dependency, remove the package that pulled it in, then reinstall.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

As a temporary measure, avoid using the statsapi package until a secure version is confirmed. Regularly monitor the package repository for updates and consider using alternative packages that provide similar functionality without the associated risks.

Conclusion

The statsapi package has been identified as malicious, posing a risk of data exfiltration upon installation. Users are advised to uninstall the package and monitor for updates or alternatives. Utilizing tools like Vulert can help in identifying vulnerabilities in your software.

See every vulnerability recorded for statsapi →

Share this vulnerability

FAQ

The statsapi package is a Python library intended for handling statistical data, but it has been compromised to include malicious code.

The malicious code executes during installation, exfiltrating sensitive information such as IP addresses and usernames from the host system.

Uninstall the package immediately using pip uninstall statsapi and monitor for any updates or patches.

Yes, consider using other statistical libraries that do not have known vulnerabilities, such as pandas or NumPy.

You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time using just the Pipfile.lock. Check your application for vulnerabilities at Vulert Scanner without needing to sign up.

How To Fix

This package is malicious. Remove it and rotate any credentials it could have accessed.

pip uninstall statsapi

If it arrived as a transitive dependency, remove the package that pulled it in, then reinstall.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback