Katalog CWE

CWE-1004 · Słabość

Sensitive Cookie Without 'HttpOnly' Flag

Abstrakcja
Wariant
Status
Niekompletny
Ryzyko wykorzystania
średnie
Dodano
2 stycznia 2017
Ostatnia zmiana
30 kwietnia 2026

Podatności CVE z tą słabościąPełny wpis na cwe.mitre.org ↗

Opis

The product uses a cookie to store sensitive information, but the cookie is not marked with the HttpOnly flag.

Skutki

  • Confidentiality

    Read Application Data

    If the HttpOnly flag is not set, then sensitive information stored in the cookie may be exposed to unintended parties.

  • Integrity

    Gain Privileges or Assume Identity

    If 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.

Zapobieganie

  • Implementation

    Leverage the HttpOnly flag when setting a sensitive cookie in a response.

    Skuteczność: High

Przykłady podatności

Słabość nadrzędna

Kiedy powstaje

Dotyczy

Not Language-Specific, Web Based, Web Server

Źródła

  1. HttpOnly — OWASP
  2. Some Bad News and Some Good News — Michael Howard, 2002
  3. C is for cookie, H is for hacker - understanding HTTP only and Secure cookies — Troy Hunt, 2013
  4. Mitigating Cross-site Scripting With HTTP-only Cookies — Microsoft
  5. Securing Cookies: Why You Should Always Set HttpOnly — Ajay Monga, 2025

Wpis z katalogu CWE 4.20.