Skip to content

πŸ›‘οΈ Sentinel: [CRITICAL] Fix insecure deserialization#97

Open
tomdesair wants to merge 2 commits into
masterfrom
bugfix/fix-insecure-deserialization-14551684257576266736
Open

πŸ›‘οΈ Sentinel: [CRITICAL] Fix insecure deserialization#97
tomdesair wants to merge 2 commits into
masterfrom
bugfix/fix-insecure-deserialization-14551684257576266736

Conversation

@tomdesair

Copy link
Copy Markdown
Owner

🚨 Severity: CRITICAL
πŸ’‘ Vulnerability: ObjectInputStream was used without restriction to deserialize objects from a file on disk. This is a potential risk for arbitrary code execution if an attacker is able to upload a maliciously crafted serialized object.
🎯 Impact: Remote code execution (RCE)
πŸ”§ Fix: Replaced ObjectInputStream with ValidatingObjectInputStream (from commons-io) to explicitly allow-list accepted classes (java.lang.*, java.util.*, me.desair.tus.server.*).
βœ… Verification: Ran unit tests and ensured that existing object serialization and deserialization functions correctly without regressions.


PR created automatically by Jules for task 14551684257576266736 started by @tomdesair

🚨 Severity: CRITICAL
πŸ’‘ Vulnerability: ObjectInputStream was used without restriction to deserialize objects from a file on disk. This is a potential risk for arbitrary code execution if an attacker is able to upload a maliciously crafted serialized object.
🎯 Impact: Remote code execution (RCE)
πŸ”§ Fix: Replaced ObjectInputStream with ValidatingObjectInputStream (from commons-io) to explicitly allow-list accepted classes (`java.lang.*`, `java.util.*`, `me.desair.tus.server.*`).
βœ… Verification: Ran unit tests and ensured that existing object serialization and deserialization functions correctly without regressions.

Co-authored-by: tomdesair <14034630+tomdesair@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown
Contributor

πŸ‘‹ Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a πŸ‘€ emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@coveralls

coveralls commented Jun 27, 2026

Copy link
Copy Markdown

Coverage Status

coverage: 94.924% (+0.004%) from 94.92% β€” bugfix/fix-insecure-deserialization-14551684257576266736 into master

@tomdesair

Copy link
Copy Markdown
Owner Author

@jules, please add a unit test that proves the vulnerability is now mitigated.

@google-labs-jules

Copy link
Copy Markdown
Contributor

@jules, please add a unit test that proves the vulnerability is now mitigated.

Added a unit test readSerializableWithMaliciousClass in UtilsTest.java that attempts to deserialize java.io.File which is not in the allow-list, verifying that ValidatingObjectInputStream returns null as expected and prevents the vulnerability.

🚨 Severity: CRITICAL
πŸ’‘ Vulnerability: ObjectInputStream was used without restriction to deserialize objects from a file on disk. This is a potential risk for arbitrary code execution if an attacker is able to upload a maliciously crafted serialized object.
🎯 Impact: Remote code execution (RCE)
πŸ”§ Fix: Replaced ObjectInputStream with ValidatingObjectInputStream (from commons-io) to explicitly allow-list accepted classes (`java.lang.*`, `java.util.*`, `me.desair.tus.server.*`). Also added a unit test to ensure that malicious classes are not deserialized.
βœ… Verification: Ran unit tests and ensured that existing object serialization and deserialization functions correctly without regressions, while attempting to deserialize an unlisted class returns null.

Co-authored-by: tomdesair <14034630+tomdesair@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants