Difference between revisions of "Information leak through serialization"

From OWASP
Jump to: navigation, search
Line 1: Line 1:
{{Template:SecureSoftware}}
 
 
{{Template:Vulnerability}}
 
{{Template:Vulnerability}}
Last revision (mm/dd/yy): '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''
+
{{Template:SecureSoftware}}
  
[[ASDR_TOC_Vulnerabilities|Vulnerabilities Table of Contents]]
+
__TOC__
  
 
[[ASDR Table of Contents]]
 
[[ASDR Table of Contents]]
__TOC__
+
 
 +
Last revision (mm/dd/yy): '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''
  
  

Revision as of 09:25, 2 November 2008

This is a Vulnerability. To view all vulnerabilities, please see the Vulnerability Category page.



Contents


ASDR Table of Contents

Last revision (mm/dd/yy): 11/2/2008


Description

Serializable classes are effectively open classes since data cannot be hidden in them.

Consequences

  • Confidentiality: Attacker can write out the class to a byte stream in which they can extract the important data from it.

Exposure period

  • Implementation: This is a style issue which needs to be adopted throughout the implementation of each class.

Platform

  • Languages: Java, C++
  • Operating platforms: Any

Required resources

Any

Severity

High

Likelihood of exploit

High

Classes which do not explicitly deny serialization can be serialized by any other class which can then in turn use the data stored inside it.


Risk Factors

TBD

Examples

class Teacher
{
        
        private String name;
        private String clas;
        public Teacher(String name,String clas)
        {
               //...//Check the database for the name and address
                this.SetName() = name;
                this.Setclas() = clas;

        }
}


Related Attacks


Related Vulnerabilities


Related Controls

  • 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.


Related Technical Impacts


References

TBD