Flask-HTTPAuth invokes token verification callback when missing or empty token was given by client
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
NULLinstead. - 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.
Software afectado
Haz clic en una tecnología para ver todas sus vulnerabilidades.
| Plataforma | Paquete | Versiones vulnerables | Corregida en |
|---|---|---|---|
| Python (PyPI) | flask-httpauth | < 4.8.1 | 4.8.1 |
Referencias
- https://lists.debian.org/debian-lts-announce/2026/05/msg00049.html
- https://github.com/miguelgrinberg/Flask-HTTPAuth/releases/tag/v4.8.1
- https://github.com/miguelgrinberg/Flask-HTTPAuth/security/advisories/GHSA-p44q-vqpr-4xmg
- https://github.com/miguelgrinberg/flask-httpauth/commit/b15ffe9e50e110d7174ccd944f642079e1dcf9ee
- https://nvd.nist.gov/vuln/detail/CVE-2026-34531
- https://github.com/miguelgrinberg/Flask-HTTPAuth
- Vector CVSS
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:H/A:N- Debilidad (CWE)
CWE-287- Plataforma
- Python (PyPI)
- Paquete
flask-httpauth- Publicada
- 31.03.2026
- Actualizado
- 11.10.2026 14:17
Fuentes y licencias
OSV / GitHub Advisory Database - PYSEC-2026-2152 - PyPA Advisory Database; CC BY 4.0
OSV / GitHub Advisory Database - GHSA-p44q-vqpr-4xmg - CC BY 4.0
Historial de vulnerabilidades: flask-httpauth
Todas las vulnerabilidades publicadas de este paquete (Python (PyPI)), de la más reciente a la más antigua. Muestra si es un fallo aislado o un paquete que hay que vigilar.
Esta es la única vulnerabilidad conocida de este paquete.
Identifica las vulnerabilidades de tu aplicación
Con la integración de DockRay y el inventario de software activado, DockRay compara las versiones notificadas de los componentes con las vulnerabilidades conocidas y avisa de las coincidencias confirmadas. La cobertura depende de la tecnología compatible y de los avisos disponibles.