WCSession cookie in WebSphere Commerce does not have HTTPOnly flag set

Technote (FAQ)


Question

Why does the WCSession cookie in IBM WebSphere Commerce not have the HTTPOnly flag set?

Cause

Java™ EE does not provide a mechanism to support the HttpOnly flag until servlet V3. The current servlet version WebSphere Commerce supports is V2.4. There are no current plans to support servlet V3.

Answer

If a site has an XSS vulnerability, setting the HTTPOnly flag on a cookie will prevent the possibility of the cookie being stolen by a client side script. If the site does not have an XSS vulnerability, the cookie cannot be stolen by client a side script.The HttpOnly flag provides additional protection in case an XSS vulnerability exists.

WebSphere Commerce already contains XSS filtering to help reduce this risk.

XSS filtering does not overcome the exact limitation of the lack of the HTTPOnly flag (which prevents most common XSS attacks), For example; however it tries to filter out any threats that an HTTPOnly flag would have protected against.

For more information on how this XSS filtering works, see article:
V7.0: Enabling cross-site scripting protection
V6.0: Enabling cross-site scripting protection


A possible workaround is to use a servlet filter to add the header in the HTTP response. You can use this OWASP example.

In addition to XSS filtering, a good practice is to use the <c:out> tag when using parameters on JSPs.


Rate this page:

(0 users)Average rating

Add comments

Document information


More support for:

WebSphere Commerce Enterprise
Security

Software version:

6.0, 7.0

Operating system(s):

AIX, Linux, Solaris, Windows

Software edition:

Enterprise

Reference #:

1412002

Modified date:

2013-10-14

Translate my page

Machine Translation

Content navigation