News for hackers. Stuff that matters.
Re:Web Storage: the lesser evil for session tokens by zielmicha on Tuesday May 31, 2016 @03:41PM (#11809534)
I think HttpOnly can help in case when you serve untrusted HTML on your site, but in a different origin. For example, you may have cookie for *.example.com and uploads.example.com serves user uploaded content.

Correct me if this is exploitable. (I haven't done this myself, but I've seen this in a wild).

Re:Web Storage: the lesser evil for session tokens by amjo324 on Tuesday May 31, 2016 @11:28PM (#11811882)
When an application residing at one.example.com sets a cookie, the browser by default resubmits the cookie in all subsequent requests to one.example.com and also to any subdomains, such as sub.one.example.com. It does not submit the cookie to any other domains, including the parent domain (example.com) and any other subdomains of the parent, such as two.example.com.

A server can override this default behavior by including a domain attribute in the Set-cookie instruction but this is pretty uncommon. Cookie scoping (and therefore cross-domain protection) can be managed differently if the default behaviour is not intended and HTTPOnly is not relevant here. HTTPOnly is really only a simple mitigation against the most obvious and trivial Cross-Site Scripting (XSS) exploitation technique (i.e stealing a session token).