Session storage and local storage are HTML 5 features which allow developers to easily store megabytes of data client-side, as opposed to the 4Kb cookies can accommodate. While useful to speed applications up on the client side, it can be dangerous to store sensitive information this way because the data is not encrypted by default and any script on the page may access it.

This rule raises an issue when the `localStorage` and `sessionStorage` API's are used.

## Noncompliant Code Example

    localStorage.setItem("login", login); // Noncompliant
    sessionStorage.setItem("sessionId", sessionId); // Noncompliant

## See

- Packet Storm Security - HTML 5 Modern Day Attack And Defence Vectors
- OWASP Top Ten 2013 Category A6 - Sensitive Data Exposure