Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2026-34531: CWE-287: Improper Authentication in miguelgrinberg Flask-HTTPAuth

0
Medium
VulnerabilityCVE-2026-34531cvecve-2026-34531cwe-287
Published: Wed Apr 01 2026 (04/01/2026, 20:44:10 UTC)
Source: CVE Database V5
Vendor/Project: miguelgrinberg
Product: Flask-HTTPAuth

Description

CVE-2026-34531 is an improper authentication vulnerability in Flask-HTTPAuth versions prior to 4. 8. 1. The flaw occurs when a client requests a token-protected resource without providing a token or providing an empty token. In such cases, the token verification callback is invoked with an empty string token. If the application has users with empty string tokens, the attacker could authenticate as those users without valid credentials. This vulnerability impacts confidentiality and integrity but does not affect availability. It requires no authentication or user interaction but has a high attack complexity due to the need for specific application configurations. The issue was patched in version 4. 8.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 04/01/2026, 21:24:09 UTC

Technical Analysis

Flask-HTTPAuth is a popular Python extension providing Basic, Digest, and Token HTTP authentication for Flask web applications. Prior to version 4.8.1, a vulnerability (CVE-2026-34531) existed due to improper handling of empty or missing tokens in token-based authentication. When a client request to a token-protected endpoint omits the token or sends an empty token, Flask-HTTPAuth invokes the application's token verification callback with an empty string as the token parameter. If the application's user database contains any users with an empty string as their token, the verification callback may incorrectly authenticate the client as one of those users. This results in improper authentication (CWE-287), allowing unauthorized access to protected resources. The vulnerability affects all Flask applications using Flask-HTTPAuth versions earlier than 4.8.1 that rely on token authentication and have users with empty string tokens. Exploitation does not require prior authentication or user interaction but depends on the application’s token management practices. The flaw impacts confidentiality by potentially exposing user data and integrity by allowing unauthorized actions under another user's identity. The vulnerability was addressed in Flask-HTTPAuth 4.8.1 by correcting the handling of empty tokens to prevent invocation of the verification callback with empty strings.

Potential Impact

The vulnerability can lead to unauthorized access to protected resources if the application has users with empty string tokens, compromising confidentiality and integrity. Attackers could impersonate legitimate users without valid credentials, potentially accessing sensitive data or performing unauthorized operations. Although the attack complexity is high because it requires the presence of empty string tokens in the user database—a poor security practice—the impact on affected organizations can be significant, especially for applications handling sensitive or critical data. Since Flask-HTTPAuth is widely used in Python web applications globally, organizations relying on vulnerable versions may face risks of data breaches or unauthorized modifications. There is no impact on availability. No known exploits are reported in the wild yet, but the vulnerability is publicly disclosed, increasing the risk of exploitation attempts.

Mitigation Recommendations

The primary mitigation is to upgrade Flask-HTTPAuth to version 4.8.1 or later, where the vulnerability is patched. Additionally, organizations should audit their user token databases to ensure no users have empty string tokens, as this is a poor security practice that facilitates exploitation. Implement strict token generation and validation policies to prevent empty or null tokens. Review and harden the token verification callback logic to reject empty or missing tokens explicitly. Employ comprehensive logging and monitoring of authentication attempts to detect anomalous access patterns. Conduct security testing on authentication flows to verify no improper authentication paths exist. Finally, educate developers on secure token management and the risks of improper authentication handling.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2026-03-30T16:03:31.048Z
Cvss Version
3.1
State
PUBLISHED

Threat ID: 69cd8944e6bfc5ba1dfc32e5

Added to database: 4/1/2026, 9:08:20 PM

Last enriched: 4/1/2026, 9:24:09 PM

Last updated: 4/1/2026, 10:16:00 PM

Views: 3

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses