Skip to content

Latest commit

 

History

History
18 lines (13 loc) · 538 Bytes

File metadata and controls

18 lines (13 loc) · 538 Bytes

Question

What is the problem here?

protected void processUploadedFiles(String filePath) {
  System.out.println("Your file is being processed now!");
  FileInputStream fileInput = new FileInputStream(filePath);
  ObjectInputStream objectInput = new ObjectInputStream(fileInput);
  Object obj = objectInput.readObject();
}

-----SPLIT-----

Answer

It is a Deserialization issue. 'fileInput' file content is not being checked before processing and directly deserialization of user supplied data may cause security issues.