CVE-2026-34531 Flask-HTTPAuth invokes token verification callback when missing or empty token was given by client
Attackers can bypass authentication if the application database contains users with empty tokens, allowing unauthorized access to protected resources.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2026-34531?
CVE-2026-34531 is a medium-severity authentication bypass vulnerability in miguelgrinberg Flask-HTTPAuth, published on 1 Apr 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
Flask-HTTPAuth provides Basic, Digest and Token HTTP authentication for Flask routes. Prior to version 4.8.1, in a situation where the client makes a request to a token protected resource without passing a token, or passing an empty token, Flask-HTTPAuth would invoke the application's token verification callback function with the token argument set to an empty string. If the application had any users in its database with an empty string set as their token, then it could potentially authenticate the client request against any of those users. This issue has been patched in version 4.8.1.
Weakness: CWE-287
Which versions are affected by CVE-2026-34531?
3 open source packages ship an affected version, including flask-httpauth and Flask-HTTPAuth. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
flask-httpauth PyPI | All versions | 4.8.1 |
flask-httpauth PyPI | All versions | 4.8.1 |
Flask-HTTPAuth PyPI | All versions | 4.8.1 |
Linux distribution packages (2)
python-Flask-HTTPAuth openSUSE:Leap 16.0 | All versions | 4.8.0-bp160.2.1 |
python-Flask-HTTPAuth openSUSE:Tumbleweed | All versions | 4.8.1-1.1 |
Products include Miguelgrinberg Flask-Httpauth.
How do I fix CVE-2026-34531?
Upgrade flask-httpauth to 4.8.1 or later.
Upgrade, and rotate credentials and sessions that may have been exposed. More about Authentication bypass.
Is CVE-2026-34531 being exploited?
There is no known exploitation of CVE-2026-34531 in the wild and no public exploit code.
Sources
Also known as DEBIAN-CVE-2026-34531, GHSA-p44q-vqpr-4xmg, PYSEC-2026-2152, UBUNTU-CVE-2026-34531, openSUSE-SU-2026:10518-1, openSUSE-SU-2026:20576-1.