Skip to content

Java: Unsafe deserialization with Jackson #368

@artem-smotrakov

Description

@artem-smotrakov

Query

github/codeql#5900

CVE ID(s)

Report

Deserialization of untrusted data with Jackson is known to be dangerous:

https://www.github.com/mbechler/marshalsec/blob/master/marshalsec.pdf?raw=true

I'd like to propose to add sinks for Jackson to UnsafeDeserialization.ql.

There are multiples CVEs for deserialization gadgets for Jackson Databind:

https://www.cvedetails.com/vulnerability-list/vendor_id-15866/product_id-42991/Fasterxml-Jackson-databind.html

Those CVEs create quite a lot of noise because many applications don't use polymorphic typing. The query would help check if applications are really affected by such CVEs. On the other hand, if an application actually turns on polymorphic typing, and deserializes data from remote peers, that would be a significant security risk that can be identified by this query.

  • Are you planning to discuss this vulnerability submission publicly? (Blog Post, social networks, etc). We would love to have you spread the word about the good work you are doing

I am planning to write wrote a blog post about detecting such issues.

Result(s)

Metadata

Metadata

Assignees

No one assigned

    Labels

    All For OneSubmissions to the All for One, One for All bounty

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions