
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2026-34531 is an improper authentication vulnerability in Flask-HTTPAuth, a Python extension that provides HTTP authentication for Flask routes. When a client makes a request to a token-protected resource without providing a token or with an empty token, Flask-HTTPAuth incorrectly invokes the application's token verification callback with the token argument set to an empty string rather than rejecting the request outright. If the application's user database contains any users with an empty string stored as their token value, the request may be authenticated against those users, effectively bypassing authentication. All versions of Flask-HTTPAuth up to and including 4.8.0 are affected; the issue was disclosed by the maintainer on March 28, 2026, and published to the GitHub Advisory Database on March 31, 2026. The GitHub Advisory rates this as Moderate with a CVSS v3.1 score of 6.5, while Feedly's aggregated data assigns a score of 8.2 (High) (Github Advisory, Flask-HTTPAuth Advisory).
The root cause is classified as CWE-287 (Improper Authentication). In the vulnerable code path within src/flask_httpauth.py, the authenticate method retrieved the token using getattr(auth, 'token', ''), defaulting to an empty string when no token was present, and then passed this empty string directly to the application's verify_token_callback without first checking whether the token was non-empty (Patch Commit). The fix changes the default to None and adds a truthiness check (if token and self.verify_token_callback) so that empty or missing tokens are rejected before the callback is ever invoked. Exploitation requires a specific precondition: the target application must store empty strings (rather than NULL) as token values for users who have not been assigned a token. This vulnerability does not affect JWT-based or cryptographic token verification, nor Basic or Digest authentication schemes (Github Advisory).
Successful exploitation allows an unauthenticated attacker to bypass token-based access controls and gain unauthorized access to protected API endpoints or resources. The confidentiality impact is low (partial data exposure), while the integrity impact is high — an attacker authenticated as a user with an empty token could perform any action that user is authorized to perform, including modifying or deleting data. Availability is not directly impacted. The scope of affected assets depends on the application's authorization model; in multi-tenant or privileged-access scenarios, this could enable significant unauthorized data access or manipulation (Flask-HTTPAuth Advisory, Github Advisory).
There is no public proof-of-concept exploit code and no evidence of in-the-wild exploitation at this time (Github Advisory). The EPSS score is approximately 0.019–0.038%, indicating a low near-term probability of exploitation. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. Exploitation is conceptually straightforward — sending a request with an empty or absent Authorization token — but requires the specific precondition of empty-string tokens existing in the target application's database, which limits the practical attack surface.
401 Unauthorized response with a WWW-Authenticate header indicating token-based auth (e.g., WWW-Authenticate: Bearer realm="...")GET /api/protected HTTP/1.1
Host: target.example.com
Authorization: Bearer or omit the Authorization header entirely.200 OK response with protected data.Authorization header value (e.g., Authorization: Bearer with no token following the scheme) or with the Authorization header entirely absent, followed by unexpected 200 OK responses instead of 401.The primary remediation is to upgrade Flask-HTTPAuth to version 4.8.1 or later, which rejects empty or missing tokens before invoking the verification callback (Flask-HTTPAuth Release, Patch Commit). For applications that cannot immediately upgrade, audit the user database and change any empty string ('') token values to NULL — this prevents the callback from matching an empty token to a real user. After remediation, review authentication logs for any suspicious access patterns that may indicate prior exploitation (Github Advisory).
The vulnerability was reported by security researcher npbhatter17 and disclosed responsibly by maintainer Miguel Grinberg, who published the advisory and patch simultaneously on March 28, 2026 (Flask-HTTPAuth Advisory). The issue was subsequently picked up by downstream Linux distributions including Debian LTS and openSUSE, which issued their own security announcements. No significant social media controversy or broad community debate has been observed, consistent with the narrow exploitation preconditions limiting the practical impact.
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."