When the default configuration turns you “Super(up)set”?
The default Superset configuration uses Flask's client-side session cookies signed with a secret key, and logout does not invalidate them. An attacker who obtains a session cookie can reuse it after logout, and if the secret key is weak or default, they can brute-force it offline and forge an admin session cookie.
medium.com
Published on medium.com
Since June of 2024 I have decided to start an independent security research in the Apache Projects on GitHub , during my free time (nightly, weekends and idle holidays). PS.: Obviously, the focus and energy were divided between few other projects and personal hobbies.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the application relies on client-side session cookies signed with a potentially weak or default secret key, and does not invalidate sessions on logout.
Impact
An attacker who obtains a session cookie can reuse it after logout, and if the secret key is weak or default, they can brute-force it offline and forge an admin session cookie, leading to account takeover.
What the attacker needed
Access to a session cookie; weak or default secret key; network access to the Superset instance
The fix
The advisory recommends configuring short session timeouts, optionally using server-side sessions, and ensuring the secret key is cryptographically strong and unique.
How it was found
- Start a default Superset Docker container with a chosen SUPERSET_SECRET_KEY.
- Create an admin user and log in to obtain a session cookie.
- Log out and observe that the old session cookie still works.
- Use the same secret key to sign a new session cookie with user id 1 (admin) and access the API.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
Superset uses cookies to remember who is logged in. These cookies are signed with a secret key, but if that key is weak or the default, an attacker can guess it and create their own admin cookie. Also, logging out doesn't actually cancel the old cookie, so a stolen cookie keeps working.
What is Account takeover?
Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.