CWE•Variant•Incomplete•4 recent CVEs
CWE-1004Sensitive Cookie Without 'HttpOnly' Flag
Description
The product uses a cookie to store sensitive information, but the cookie is not marked with the HttpOnly flag.
Common consequences
- Confidentiality→Read Application DataIf the HttpOnly flag is not set, then sensitive information stored in the cookie may be exposed to unintended parties.
- Integrity→Gain Privileges or Assume IdentityIf the cookie in question is an authentication cookie, then not setting the HttpOnly flag may allow an adversary to steal authentication data (e.g., a session ID) and assume the identity of the user.
Potential mitigations
- ImplementationLeverage the HttpOnly flag when setting a sensitive cookie in a response.