{"id":"CVE-2026-34531","aliases":["CVE-2026-34531","GHSA-p44q-vqpr-4xmg","PYSEC-2026-2152"],"related":[],"kind":"vulnerability","state":"published","title":"Flask-HTTPAuth invokes token verification callback when missing or empty token was given by client","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"## Summary\n\nIn 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.\n\n## Notes\n\n- This issue applies only to token authentication\n- This issue applies only when the application verifies tokens by searching for them in a user database.\n- 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.\n- Tokens that are verified through cryptographic means (such as JWTs) are not affected by this issue.\n- Basic and Digest authentication are not affected by this issue.\n\n## Remediation\n\nTo 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.\n\nAlternatively, developers can upgrade their projects to `Flask-HTTPAuth>=4.8.1`, which fixes this issue.","format":"markdown","source":"ghsa"},{"lang":"es","text":"Flask-HTTPAuth proporciona autenticación HTTP Basic, Digest y por Token para rutas de Flask. Antes de la versión 4.8.1, en una situación donde el cliente realiza una solicitud a un recurso protegido por token sin pasar un token, o pasando un token vacío, Flask-HTTPAuth invocaría la función de callback de verificación de token de la aplicación con el argumento del token establecido como una cadena vacía. Si la aplicación tenía usuarios en su base de datos con una cadena vacía establecida como su token, entonces podría potencialmente autenticar la solicitud del cliente contra cualquiera de esos usuarios. Este problema ha sido parcheado en la versión 4.8.1.","source":"nvd"}],"published":"2026-03-31T23:48:02.000Z","modified":"2026-10-26T22:10:00.163Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:H/A:N","score":6.5,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:H/A:N","score":6.5,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:H/A:N","score":6.5,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:N","score":8.2,"rating":"HIGH"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:N","score":8.2,"rating":"HIGH"}],"cwes":["CWE-287"],"affected":[{"ranges":[{"version":"< 4.8.1","status":"affected"}],"vendor":"miguelgrinberg","product":"Flask-HTTPAuth","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"4.8.1"}],"ecosystem":"PyPI","package":"flask-httpauth","purl":"pkg:pypi/flask-httpauth","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"4.8.1"}],"vendor":"miguelgrinberg","product":"flask-httpauth","cpe":"cpe:2.3:a:miguelgrinberg:flask-httpauth:*:*:*:*:*:python:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"4.8.1"}],"ecosystem":"PyPI","package":"flask-httpauth","purl":"pkg:pypi/flask-httpauth","source":"pysec"}],"references":[{"url":"https://github.com/miguelgrinberg/Flask-HTTPAuth/security/advisories/GHSA-p44q-vqpr-4xmg","tags":["advisory","mitigation","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/miguelgrinberg/flask-httpauth/commit/b15ffe9e50e110d7174ccd944f642079e1dcf9ee","tags":["fix","patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/miguelgrinberg/Flask-HTTPAuth/releases/tag/v4.8.1","tags":["advisory","product","release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://lists.debian.org/debian-lts-announce/2026/05/msg00049.html","tags":["web"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-34531","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/miguelgrinberg/Flask-HTTPAuth","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-04-02T15:13:05.354Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-34531","url":"https://www.cve.org/CVERecord?id=CVE-2026-34531","licence":"CVE Terms of Use","modified":"2026-05-28T17:14:53.255Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-p44q-vqpr-4xmg","url":"https://github.com/advisories/GHSA-p44q-vqpr-4xmg","licence":"CC-BY-4.0","modified":"2026-07-13T07:26:38.928Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-34531","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-34531","licence":"Public domain","modified":"2026-10-26T22:10:00.163Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-2152","url":"https://osv.dev/vulnerability/PYSEC-2026-2152","licence":"CC-BY-4.0","modified":"2026-07-13T07:15:25.077Z"}],"updatedAt":"2026-11-25T22:59:17.738Z","epss":{"score":0.00368,"percentile":0.32739,"date":"2026-12-01T12:00:22.000Z"}}