Dynamic Code Evaluation: Unsafe Deserialization
Fortify identifies a Dynamic Code Evaluation: Unsafe Deserialization vulnerability when the following is identified in a pom.xml
Does anyone know why this declaration would lead to the vulnerability?
Re: Dynamic Code Evaluation: Unsafe Deserialization
I guess Fortify tries on a component analysis hat here. The library creates unauthenticated JMX endpoints. The Java deserialization attack involves sending a serialized data of a Java class whose instantiation will execute actions controlled by the data.
That is, if a widely used class org.company.fileops.FileWriter deletes a file submitted to it as an argument in its constructor FileWriter(String fileName), sending a serialization of FileWriter with an important file path in it and the server's deserializing it will result in deleting that file on the server. This works regardless of the class expected by the recipient (the ois.readObject() caller) that will throw a class cast exception only after the received data are turned into a FileWriter instance.