Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Every serializable container class that has private mutable sub-objects instance variables must defensively copy these sub-objects them in the readObject method. An adversary can append extra references to the sub-objects variables to generate a new byte stream. When deserialized, this byte stream allows the creation of a container instance whose internal sub-object variable references will be attacker controllable. Consequently, this allows the instance of the container class to mutate and violate its guarantees.

...