Summary
DataHub Frontend's sessions are configured using Play Framework's default settings for stateless session which do not set an expiration time for a cookie. Due to this, if a session cookie were ever leaked, it would be valid forever.
Details
DataHub uses a stateless session cookie that is not invalidated on logout, it is just removed from the browser forcing the user to login again. However, if an attacker extracted a cookie from an authenticated user it would continue to be valid as there is no validation on a time window the session token is valid for due to a combination of the usage of LegacyCookiesModule from Play Framework and using default settings which do not set an expiration time.
PoC
Take a PLAY_SESSION cookie from an expired session and attempt to use it with a curl request with other proper headers set, the cookie will be accepted as valid despite any length of time passing.
Impact
All DataHub instances prior to the patch will accept any session token created at any point in time as valid for the user it is valid for.
Credit
Dor Konis - GE Vernova
Summary
DataHub Frontend's sessions are configured using Play Framework's default settings for stateless session which do not set an expiration time for a cookie. Due to this, if a session cookie were ever leaked, it would be valid forever.
Details
DataHub uses a stateless session cookie that is not invalidated on logout, it is just removed from the browser forcing the user to login again. However, if an attacker extracted a cookie from an authenticated user it would continue to be valid as there is no validation on a time window the session token is valid for due to a combination of the usage of LegacyCookiesModule from Play Framework and using default settings which do not set an expiration time.
PoC
Take a PLAY_SESSION cookie from an expired session and attempt to use it with a curl request with other proper headers set, the cookie will be accepted as valid despite any length of time passing.
Impact
All DataHub instances prior to the patch will accept any session token created at any point in time as valid for the user it is valid for.
Credit
Dor Konis - GE Vernova