CWE一覧に戻る
CWE-499

機密データを含むシリアライズ可能なクラス

Serializable Class Containing Sensitive Data
脆弱性 レビュー中
JA

このコードには機密データを持つクラスが含まれているが、そのクラスは明示的にシリアライズを拒否していない。別のクラスを通してクラスを直列化することで、データにアクセスできます。

シリアライズ可能なクラスは、データを隠すことができないので、事実上オープンなクラスです。明示的にシリアライズを拒否していないクラスは、他のクラスによってシリアライズされる可能性があります。

EN

The code contains a class with sensitive data, but the class does not explicitly deny serialization. The data can be accessed by serializing the class through another class.

Serializable classes are effectively open classes since data cannot be hidden in them. Classes that do not explicitly deny serialization can be serialized by any other class, which can then in turn use the data stored inside it.

Scope: Confidentiality / Impact: Read Application Data
In Java, explicitly define final writeObject() to prevent serialization. This is the recommended solution. Define the writeObject() function to throw an exception explicitly denying serialization.
Make sure to prevent serialization of your objects.
MITRE公式ページ — CWE-499