Is There a Plan to Remove Serialization from OpenJDK?

0
23
Asked By TechieGuru92 On

Has the OpenJDK team ever considered the option of completely removing serialization without any replacement? Serialization 1.0 has proven to be quite dangerous because it's included with the JVM by default, even if you don't intend to use it. Unlike libraries like Jackson that you can choose to include, serialization is just there. Recently, newer JDKs allow you to disable serialization using serialization filters, which enhances security. Will there be a way to disable serialization 2.0 in a similar fashion?

3 Answers

Answered By SecureCoder88 On

To add to that, the reason Serialization 1.0 is considered so dangerous is that it's included in the JVM regardless. Even if you didn’t intend for your app to use it, things like RMI and JMX might still be using it under the hood, leading to unintended vulnerabilities. So the concern is valid.

Answered By JavaNerd01 On

Yes, there have been discussions about removing serialization altogether. Developers like Brian Goetz have invested a lot of time figuring out how to mitigate the issues with Serialization 1.0. You raised a great question about disabling Serialization 2.0. Just to clarify, the real concern isn't serialization itself—it’s deserialization that's often problematic. Deserialization turns external data into objects, and you can do that without needing either version of serialization. Unless they incorporate a filter for Serialization 2.0, you probably won't have the ability to deactivate it entirely the way you could with the SecurityManager.

DevExpert22 -

That makes sense! So, it's mainly about managing what's coming in, right?

Answered By CodeWizard77 On

I'm not sure I understand your point. Using built-in serialization is a choice, just like opting for libraries like Fury or Kryo.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.