Skip to main content
MalwarePublished

flask-header-guard (PyPI) · Malicious Code

Affects flask-header-guardSource GCVE Database

0

Malicious package : remove flask-header-guard and rotate any secrets on hosts that installed it.

Data as of 9 Sep 2026, 21:52 UTC

Classification

Malicious package

Published to PyPI · OSV MAL-2026-15566

What to do

Remove flask-header-guard from every project, lockfile and image that pulls it in. Treat any host that installed it as compromised: rotate the credentials, tokens and keys it could read, from a clean machine.

Affected software

ProductAffectedFixed in
PyPIflask-header-guardAffected
  • =1.0.0
Fixed in–

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

Description

The flask-header-guard package on PyPI (version 1.0.0) is a malicious package masquerading as Flask security-headers middleware. It executes hostile code during installation and when imported, including exfiltration of sensitive environment variables and system files, establishing persistence via a reverse shell, local privilege escalation, and an unauthenticated remote code execution backdoor in Flask apps.

References

Community reviews

Loading reviews…