pypi · Malicious package advisory
Malwareflask-header-guard
GHSA-gmgc-w467-4xf7
Malicious code in flask-header-guard (PyPI)
Details
**Severity:** Critical **Affected versions:** `= 1.0.0` ## Source: kam193 (d050fa5a7000088c15b40b82ace014d66f18520ff36464659c8ad6e999ee83cb) During installation, the package attempts to exfiltrate sensitive environment variables and files, establish persistence and open a reverse shell. Additionally, the provided Flask middleware embeds a backdoor. --- Category: MALICIOUS - The campaign has clearly malicious intent, like infostealers. Campaign: 2026-08-pygame-renderkit Reasons (based on the campaign): - The package contains code to create a reverse shell, allowing an attacker to execute any commands on the victim's machine. - files-exfiltration - The package overrides the install command in setup.py to execute malicious code during installation. - exfiltration-env-variables - persistence --- Credit: [OpenSSF](https://github.com/ossf/malicious-packages) ([source](https://github.com/ossf/malicious-packages/blob/c40f765296358a44eb5f2d931a66d5d58d41caf7/osv/malicious/pypi/flask-header-guard/MAL-2026-15566.json)) **References:** - https://bad-packages.kam193.eu/pypi/package/flask-header-guard - https://github.com/ossf/malicious-packages/blob/c40f765296358a44eb5f2d931a66d5d58d41caf7/osv/malicious/pypi/flask-header-guard/MAL-2026-15566.json - https://github.com/ossf/malicious-packages/blob/99ffa6ed40431db8a5e16c67408edddb4a51fe17/osv/malicious/pypi/flask-header-guard/MAL-2026-15566.json - https://pypi.org/project/flask-header-guard/1.0.0 - https://github.com/advisories/GHSA-gmgc-w467-4xf7
Compromised versions (1)
- = 1.0.0
Any computer that installed or ran a compromised version should be considered fully compromised. Rotate every secret on that machine from a clean environment.