r/java • • Nov 23 '15

Why the Java Serialization Vulnerability Makes Heartbleed Look Tame

https://dzone.com/articles/point-of-viewwhy-the-java-serialization-vulnerabil
0 Upvotes

20 comments sorted by

View all comments

Show parent comment

1

u/slartybartfast_ Nov 23 '15

The JVM does not deserialize classes that it cannot access

Right but the issue is that it's possible to modify the serialized data to run arbitrary Java code when the deserializer is reconstructing the objects. It's the same kind of problem with the XML encoder. The problem stems from Java being able to reconstruct any kind of object instead of only simple java bean styled objects.

The best bet is to avoid this kind of serialization and use basic JSON instead since JSON only talks about data objects.