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.
NULL instead.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.
{
"cwe_ids": [
"CWE-287"
],
"github_reviewed_at": "2026-03-31T23:48:02Z",
"nvd_published_at": "2026-04-01T21:17:01Z",
"severity": "MODERATE",
"github_reviewed": true
}