Vulnerabilities in pkg:pypi/Flask-HTTPAuth
PACKAGECVE-2026-34531 is a MODERATE (CVSS 6.5) flask-httpauth invokes token verification callback vulnerability (CWE-287: Improper Authentication) affecting Flask HTTPAuth libraries in the PyPI ecosystem. The issue involves flask-httpauth invokes token verification callback when missing or empty token was given by client. Remediation is available by upgrading affected packages to version 4.8.1.
pkg:pypi/Flask-HTTPAuth
Vulnerability advisories affecting package pkg:pypi/Flask-HTTPAuth. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-p44q-vqpr-4xmg | CVE-2026-34531 | MODERATE | Flask-HTTPAuth invokes token verification callback when missing or empty token was given by client |
CVE-2026-34531 at a Glance
Security Impact
CVSS: 6.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:H/A:N).
How to Fix CVE-2026-34531
To remediate this vulnerability, upgrade all affected Flask HTTPAuth dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install Flask-HTTPAuth>=4.8.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show Flask-HTTPAuth
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2026-34531, inspect your installed packages using pip:
pip show Flask-HTTPAuth
Analyze the terminal output to locate any version of Flask HTTPAuth in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.8.1), your application is affected.
Note: The pip show Flask-HTTPAuth command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-287: Improper Authentication, where when an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct. In Flask HTTPAuth, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-34531 Affected Flask HTTPAuth Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
Flask-HTTPAuth
|
PyPI |
< 4.8.1
|
4.8.1
|
References
Frequently Asked Questions
What is CVE-2026-34531?
Which Flask HTTPAuth versions are affected?
What version fixes CVE-2026-34531?
Is Flask-HTTPAuth affected?
What is the CVSS score of CVE-2026-34531?
What CWE is associated with CVE-2026-34531?
How can I check PyPI dependencies for CVE-2026-34531?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-p44q-vqpr-4xmg",
"modified" : "2026-05-28T18:30:24Z",
"published" : "2026-03-31T23:48:02Z",
"aliases" : [ "CVE-2026-34531" ],
"summary" : "Flask-HTTPAuth invokes token verification callback when missing or empty token was given by client",
"details" : "## 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.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:H/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "Flask-HTTPAuth"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "4.8.1"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 4.8.0"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/miguelgrinberg/Flask-HTTPAuth/security/advisories/GHSA-p44q-vqpr-4xmg"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-34531"
}, {
"type" : "WEB",
"url" : "https://github.com/miguelgrinberg/flask-httpauth/commit/b15ffe9e50e110d7174ccd944f642079e1dcf9ee"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/miguelgrinberg/Flask-HTTPAuth"
}, {
"type" : "WEB",
"url" : "https://github.com/miguelgrinberg/Flask-HTTPAuth/releases/tag/v4.8.1"
}, {
"type" : "WEB",
"url" : "https://lists.debian.org/debian-lts-announce/2026/05/msg00049.html"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-287" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-03-31T23:48:02Z",
"nvd_published_at" : "2026-04-01T21:17:01Z"
}
}