ASVS Issue #3331 — HttpOnly cookie接頭辞(__Http-/__Host-Http-)の要求
ASVS Issue #3331 — HttpOnly cookie接頭辞の要求
概要
ASVS 要件 3.3.4 に対して、__Http- および __Host-Http- 接頭辞をHttpOnly cookieに要求する proposal。
詳細
現在の 3.3.4 では、session token 等のクライアントサイドスクリプトからアクセス不应该な値には HttpOnly 属性を設定することを求めている。
本 issue は、新たに __Http- および __Host-Http- 接頭辞を追加し、クライアントサイド JS による cookie の上書きを防止することを提案している。
提案の背景:
__Host-接頭辞は cookie のスコープをオリジンに制限し、サブドメインからの書き込みを防止__Http-接頭辞は JS からのアクセスをさらに制限- 注意点:
__Secure-Http-接頭辞は存在しない
セキュリティ影響
- カテゴリ: V3 Session Management
- 重要度: High — cookie ハイジャックと CSRF 攻撃の緩和に直接寄与
- 影響範囲: 全Webアプリケーションのセッション管理実装
原文
Currently, we have this requirement: 3.3.4 Verify that if the value of a cookie is not meant to be accessible to client-side scripts (such as a session token), the cookie must have the 'HttpOnly' attribute set...
There are apparently new
__Http-and__Host-Http-prefixes forHttpOnlycookies, which protects the cookie from being overwritten by client-side JS code. Shall we require this usage somehow in this requirement?