正式なドキュメントは英語版であり、この日本語訳はAI支援翻訳により作成された参考用のものです。日本語訳の一部の内容は人間によるレビューがまだ行われていないため、翻訳のタイミングにより英語版との間に差異が生じることがあります。最新かつ正確な情報については、英語版をご参照ください。

Sensitive cookie without HttpOnly attribute

Description

The cookie was transmitted in a Set-Cookie header without the HttpOnly attribute set. To prevent JavaScript being able to access the cookie value - usually via document.cookies - all cookies that are used for authorization should have the HttpOnly attribute set.

Remediation

Most web application frameworks allow configuring how cookies are sent to user-agents. Consult your framework’s documentation for more information on how to enable various security directives when assigning cookies to clients.

If the application is assigning cookies via writing to the response headers directly, ensure all responses include the HttpOnly attribute. By enabling this protection, the application is able to mitigate the impact of certain Cross-Site Scripting (XSS) attacks.

Example:

Set-Cookie: {cookie_name}=<random secure value>; HttpOnly

Details

IDAggregatedCWETypeRisk
1004.1false1004PassiveLow