Flask-HTTPAuth flaw could let attackers bypass authentication via empty tokens
Ubuntu has issued USN-9232-1 for a Flask-HTTPAuth vulnerability that could allow a remote attacker to bypass authentication in certain applications.
PythonVulnerabilitiesKey points
- Flask-HTTPAuth called the token verification callback even when no token was provided.
- Applications with users assigned an empty token could be vulnerable to authentication bypass.
- Ubuntu has released fixes in security notice USN-9232-1.
Ubuntu has published security notice USN-9232-1 describing a vulnerability in Flask-HTTPAuth, an extension that handles HTTP authentication for Flask applications.
According to the Ubuntu notice, Flask-HTTPAuth would invoke an application's token verification callback even when a client supplied no token, passing an empty value in that case. For applications that happened to have users configured with an empty token, this behavior could allow a remote attacker to bypass authentication.
The notice does not describe active exploitation or detail which specific application configurations are at risk beyond the empty-token condition.
Administrators running affected Ubuntu systems should apply the updates referenced in USN-9232-1. For full details, see the original Ubuntu Security Notice.
What to do
- Apply the updates provided in Ubuntu notice USN-9232-1.
- Review applications for any users configured with an empty token.
Original report
“USN-9232-1: Flask-HTTPAuth vulnerability”
It was discovered that Flask-HTTPAuth called the application's token verification callback with an empty token when a client did not provide a token. If an application had users with an empty token, a remote attacker could possibly use this issue to bypass authentication.