Katalog CWE

CWE-499 · Słabość

Serializable Class Containing Sensitive Data

Abstrakcja
Wariant
Status
Szkic
Ryzyko wykorzystania
wysokie
Dodano
19 lipca 2006
Ostatnia zmiana
11 grudnia 2025

Podatności CVE z tą słabościąPełny wpis na cwe.mitre.org ↗

Opis

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.

Skutki

  • Confidentiality

    Read Application Data

    an attacker can write out the class to a byte stream, then extract the important data from it.

Zapobieganie

  • Implementation

    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.

  • Implementation

    Make sure to prevent serialization of your objects.

Słabość nadrzędna

Może prowadzić do

Kiedy powstaje

Dotyczy

Java

Źródła

  1. The CLASP Application Security Process — Secure Software, Inc., 2005

Wpis z katalogu CWE 4.20.