CWE一覧に戻る
CWE-1004

HttpOnly」フラグのないセンシティブクッキー

Sensitive Cookie Without 'HttpOnly' Flag
脆弱性 作成中
JA

この製品はクッキーを使用して機密情報を保存しますが、クッキーにはHttpOnlyフラグが付けられていません。

HttpOnly フラグは、クライアント側のスクリプトがクッキーにアクセスしないように、互換性のあるブラウザに指示します。Set-Cookie HTTP レスポンス・ヘッダに HttpOnly フラグを含めることは、攻撃者のスクリプト・コードがクッキーの内容を読み取 り、取得した情報を流出させようとするかもしれないクロスサイト・スクリプティング(XSS)に関連するリスクを軽減するのに役立ちます。このフラグが設定されている場合、このフラグをサポートするブラウザは、XSS によって実行されるクライアント側スクリプトによって、クッキーの内容を第三者に公開しません。

EN

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

The HttpOnly flag directs compatible browsers to prevent client-side script from accessing cookies. Including the HttpOnly flag in the Set-Cookie HTTP response header helps mitigate the risk associated with Cross-Site Scripting (XSS) where an attacker's script code might attempt to read the contents of a cookie and exfiltrate information obtained. When set, browsers that support the flag will not reveal the contents of the cookie to a third party via client-side script executed via XSS.

Scope: Confidentiality / Impact: Read Application Data
Scope: Integrity / Impact: Gain Privileges or Assume Identity
Leverage the HttpOnly flag when setting a sensitive cookie in a response.
MITRE公式ページ — CWE-1004