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

目标: 1000 元 · 已筹: 1000

100.0%

CWE-499 可序列化的类中包含敏感信息 类漏洞列表 1

CWE-499 可序列化的类中包含敏感信息 类弱点 1 条 CVE 漏洞汇总,含 AI 中文分析。

CWE-499 指包含敏感数据的类未显式禁止序列化,导致数据暴露。攻击者通过序列化该类的其他组件,间接读取并窃取内部敏感信息。由于未禁用序列化,此类数据无法真正隐藏。开发者应避免在包含机密信息的类中实现 Serializable 接口,或显式实现 writeObject 方法以抛出异常,从而阻断序列化路径,确保数据安全。

MITRE CWE 官方描述
CWE:CWE-499 包含敏感数据的可序列化类(Serializable Class Containing Sensitive Data) 英文:代码中包含一个具有敏感数据的类,但该类未显式禁止序列化。通过另一个类对该类进行序列化,即可访问这些数据。 可序列化类(Serializable classes)实际上是开放类(open classes),因为无法在其中隐藏数据。未显式禁止序列化的类可以被任何其他类进行序列化,随后这些类即可使用其中存储的数据。
常见影响 (1)
ConfidentialityRead Application Data
an attacker can write out the class to a byte stream, then extract the important data from it.
缓解措施 (2)
ImplementationIn Java, explicitly define final writeObject() to prevent serialization. This is the recommended solution. Define the writeObject() function to throw an exception explicitly denying serialization.
ImplementationMake sure to prevent serialization of your objects.
代码示例 (1)
This code creates a new record for a medical patient:
class PatientRecord { private String name; private String socialSecurityNum; public Patient(String name,String ssn) { this.SetName(name); this.SetSocialSecurityNumber(ssn); } }
Bad · Java
CVE ID标题CVSS风险等级Published
CVE-2024-5657 CraftCMS 安全漏洞 — CraftCMS Plugin - Two-Factor Authentication 3.7 Low2024-06-06

CWE-499(可序列化的类中包含敏感信息) 是常见的弱点类别,本平台收录该类弱点关联的 1 条 CVE 漏洞。