You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First a side note:
An XSS attack can run JavaScript and read cookies like the JSESSIONID. That means an attacker could hijack the user's session, so to prevent this it's good to mark the JSESSIONID as 'HttpOnly'.
GWTP has built-in protection against a different kind of attack, CSRF, via HttpSessionSecurityCookieFilter. In a CSRF attack the attacker can't see the client cookies. Unfortunately HttpSessionSecurityCookieFilter does it's magic by duplicating the JSESSIONID. So even if we mark the real JSESSIONID as HttpOnly to prevent session hijacking (see side note above), an XSS attacker can still see our JSESSIONID in the GWTP cookie, and still hijack our session. Unfortunately, we can't fix HttpSessionSecurityCookieFilter's cookie with 'HttpOnly' since GWTP client code needs to read it.
Instead we should use GWTP's RandomSecurityCookieFilter, which uses a random number rather than the JSESSIONID.
This ticket is to deprecate HttpSessionSecurityCookieFilter and document why.
Note: it's not a problem unless the app is already vulnerable to XSS, but using HttpSessionSecurityCookieFilter negates using the 'HttpOnly' preventative measure.
The text was updated successfully, but these errors were encountered:
bradcupit
added a commit
to bradcupit/GWTP
that referenced
this issue
May 9, 2014
See GitHub issue ArcBees#484
HttpSessionSecurityCookieFilter duplicates the JSESSIONID in another cookie, one that can't be marked 'Htt
pOnly'. That means in an XSS attack the attacker could read the JSESSIONID and hijack the session.
Instead we should use RandomSecurityCookieFilter which doesn't have this issue (since it doesn't duplicate the JSESSIONID).
bradcupit
added a commit
to bradcupit/GWTP
that referenced
this issue
May 9, 2014
This fixesArcBees#484
HttpSessionSecurityCookieFilter duplicates the JSESSIONID in another cookie, one that can't be marked 'Htt
pOnly'. That means in an XSS attack the attacker could read the JSESSIONID and hijack the session.
Instead we should use RandomSecurityCookieFilter which doesn't have this issue (since it doesn't duplicate the JSESSIONID).
See original discussion on the GWTP mailing list.
First a side note:
An XSS attack can run JavaScript and read cookies like the JSESSIONID. That means an attacker could hijack the user's session, so to prevent this it's good to mark the JSESSIONID as 'HttpOnly'.
GWTP has built-in protection against a different kind of attack, CSRF, via HttpSessionSecurityCookieFilter. In a CSRF attack the attacker can't see the client cookies. Unfortunately HttpSessionSecurityCookieFilter does it's magic by duplicating the JSESSIONID. So even if we mark the real JSESSIONID as HttpOnly to prevent session hijacking (see side note above), an XSS attacker can still see our JSESSIONID in the GWTP cookie, and still hijack our session. Unfortunately, we can't fix HttpSessionSecurityCookieFilter's cookie with 'HttpOnly' since GWTP client code needs to read it.
Instead we should use GWTP's RandomSecurityCookieFilter, which uses a random number rather than the JSESSIONID.
This ticket is to deprecate HttpSessionSecurityCookieFilter and document why.
Note: it's not a problem unless the app is already vulnerable to XSS, but using HttpSessionSecurityCookieFilter negates using the 'HttpOnly' preventative measure.
The text was updated successfully, but these errors were encountered: