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.
Threat Mapped score: 0.0
Industry: Finiancial
Threat priority: Unclassified
N/A
N/A
Phase | Note |
---|---|
Implementation | N/A |
Intro: This code creates a new record for a medical patient:
Body: This object does not explicitly deny serialization, allowing an attacker to serialize an instance of this object and gain a patient's name and Social Security number even though those fields are private.
class PatientRecord { private String name; private String socialSecurityNum; public Patient(String name,String ssn) { this.SetName(name); this.SetSocialSecurityNumber(ssn); } }