Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent Java deserialization of internal classes #1991

Conversation

@Marcono1234
Copy link
Contributor

@Marcono1234 Marcono1234 commented Oct 11, 2021

Adversaries might be able to forge data which can be abused for DoS attacks.
These classes are already writing a replacement JDK object through writeReplace() during serialization for a long time (multiple years), so this change should not cause any issues.

I have not added tests for the prevented deserialization because it would require hardcoding the binary deserialization data which would decrease transparency of this project.

Adversaries might be able to forge data which can be abused for DoS attacks.
These classes are already writing a replacement JDK object during serialization
for a long time, so this change should not cause any issues.
@google-cla google-cla bot added the cla: yes label Oct 11, 2021
@eamonnmcmanus
Copy link
Member

@eamonnmcmanus eamonnmcmanus commented Oct 13, 2021

This makes sense. Thanks!

@eamonnmcmanus eamonnmcmanus merged commit e6fae59 into google:master Oct 13, 2021
3 checks passed
@Marcono1234 Marcono1234 deleted the marcono1234/java-deserialization-internal-classes branch Oct 13, 2021
sakibguy added a commit to sakibguy/gson that referenced this issue Oct 14, 2021
Prevent Java deserialization of internal classes (google#1991)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants