Skip to content

Java: catch delayed unsafe deserialization #8766

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

artem-smotrakov
Copy link
Contributor

@artem-smotrakov artem-smotrakov commented Apr 17, 2022

This pull request was slpit from #8501 as suggested by @smowton.

Deserialization can sometimes be implemented in two steps. An untrusted serialized object can be stored in a field but actual deserialization happens only when the object is necessary. CVE-2016-6194 in RabbitMQ is an example of such scenario (GitHub issue). Untrusted data that comes from a response is stored in RMQObjectMessage.buf field. Then, deserialization happens when getObject() method is called. Currently, java/unsafe-deserialization query doesn't catch this.

I'd like to propose a new experimental query that contains a flow step that propagates taint from a byte array to a field.

The new query detects CVE-2016-6194. Let me know what you think.

This PR is related to github/securitylab#556

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant