Skip to content

Flask-HTTPAuth invokes token verification callback when missing or empty token was given by client

Moderate severity GitHub Reviewed Published Mar 28, 2026 in miguelgrinberg/Flask-HTTPAuth • Updated May 28, 2026

Package

pip Flask-HTTPAuth (pip)

Affected versions

<= 4.8.0

Patched versions

4.8.1

Description

Summary

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.

Notes

  • This issue applies only to token authentication
  • This issue applies only when the application verifies tokens by searching for them in a user database.
  • This issue applies only if the application stores empty strings as user tokens when the user does not have an assigned token. It does not apply if the application sets those tokens to NULL instead.
  • Tokens that are verified through cryptographic means (such as JWTs) are not affected by this issue.
  • Basic and Digest authentication are not affected by this issue.

Remediation

To protect against this issue, developers should make sure that no user in the user database has their token set to an empty string. If there are such users, change the value of those tokens to NULL instead.

Alternatively, developers can upgrade their projects to Flask-HTTPAuth>=4.8.1, which fixes this issue.

References

Published to the GitHub Advisory Database Mar 31, 2026
Reviewed Mar 31, 2026
Published by the National Vulnerability Database Apr 1, 2026
Last updated May 28, 2026

Severity

Moderate

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
High
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
High
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:H/A:N

EPSS score

Exploit Prediction Scoring System (EPSS)

This score estimates the probability of this vulnerability being exploited within the next 30 days. Data provided by FIRST.
(25th percentile)

Weaknesses

Improper Authentication

When an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct. Learn more on MITRE.

CVE ID

CVE-2026-34531

GHSA ID

GHSA-p44q-vqpr-4xmg

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.