Malicious Code Exfiltration in flask-hookserver Package
Summary
MAL-2026-505: Malicious code in flask-hookserver (PyPI). Affects flask-hookserver versions 999.0.0 – 999.0.1. No fix is published. How to fix ↓
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.
No signup required · Results in about 60 seconds
Background
The flask-hookserver package is a Python library available on PyPI, designed to facilitate the creation of webhooks for Flask applications. It allows developers to easily set up endpoints that can receive and process webhook requests. However, this package has been identified to contain malicious code that compromises user data.
Vulnerability Detail
The vulnerability originates from the malicious code embedded within the flask-hookserver package, specifically in versions 999.0.0 and 999.0.1. Upon installation or import, the package exfiltrates sensitive information such as the host's IP address and username. This behavior is executed through an overridden install command in the setup.py file, which runs the malicious code during the installation process. The potential ramifications include unauthorized access to user data and privacy violations.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
pip uninstall flask-hookserver
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 workaround, you can prevent the installation of the vulnerable package by using the following command to block it: 'pip uninstall flask-hookserver'. Additionally, consider using alternative packages that provide similar functionality without the associated risks.
Conclusion
The flask-hookserver package has been identified as containing malicious code that compromises user data. It is essential for developers to uninstall the affected versions and monitor for updates or alternatives to mitigate the risk of data exfiltration.
See every vulnerability recorded for flask-hookserver →
FAQ
Flask-hookserver is a Python library that allows developers to create webhook endpoints for Flask applications.
The malicious code exfiltrates basic information such as the host's IP address and username.
You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without requiring any signup.
If you have installed the vulnerable flask-hookserver package, you should uninstall it immediately and refrain from using it until a secure version is released.
Yes, consider using other webhook libraries that do not have known vulnerabilities and are actively maintained.