Commodore Commodore

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?

Tags (3)
2 Replies
Vice Admiral
Vice Admiral

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


Commodore Commodore

This makes perfect sense.  Thanks for the feedback.

The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.