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

23

u/curiousthis Nov 23 '15

More FUD. The actual threat level of this 'bug' is the same as the linux/windows root access ones that require local access to a server. And all this noise shows a profound level of ignorance on how classes are actually loaded by the jvm.

The JVM does not deserialize classes that it cannot access -- so this means that you cannot send it a random class for deserialization -- you'll just get a classnotfound exception if you try that. You can only deserialize a class the jvm knows about.

So in order to trigger this bug, you will need to know what classes the jvm has in its classpath, know what versions of those classes exist (the VM will refuse to deserialize a class that is a different version from that in the classpath), and know if the vm will accept a stream of bytes for deserialization.

Remember most java servers (weblogic/jboss/tomcat) are all running behind apache.

That's not to say that this is not a bug -- but it is a bug in a specific library and does not really call for this level of panic.

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.