Skip to content

Jackson Deserializer security vulnerability via default typing (CVE-2017-7525) #1599

Closed

Description

@ayound

I have send email to info@fasterxml.com

EDIT: (23-Apr-2024)

Fix in:

  • 2.7.9.1
  • 2.8.9
  • 2.9.0 and all later 2.x releases

Activity

  1. reopened this on Apr 11, 2017
  2. changed the title [-]Jackson Deserializer vulnerability, can execute any code or command[/-] [+]Jackson Deserializer security vulnerability[/+] on Apr 11, 2017
  3. cowtowncoder commented on Apr 13, 2017

    @cowtowncoder
    Member

    I have received this and am investigating possible patch. Problem is quite specific, but some aspects are more general.

  4. added 2 commits that reference this issue on Apr 13, 2017
    6ce32ff
    60d459c
  5. added this to the 2.8.9 milestone on Apr 13, 2017
  6. cowtowncoder commented on Apr 13, 2017

    @cowtowncoder
    Member

    Fixed in 2.7, 2.8 and master (to the best of my knowledge): will be in 2.8.9 and 2.7.9.1, as well as 2.9.0.pr3.

  7. Viyond commented on Apr 17, 2017

    @Viyond

    nice~

  8. ayound commented on Apr 17, 2017

    @ayound
    Author

    when do you want to release 2.7.10,2.8.9 and 2.9.0.pr3?

  9. JoyChou93 commented on Apr 17, 2017

    @JoyChou93

    when do you want to release 2.7.10,2.8.9 and 2.9.0.pr3?

  10. OneSourceCat commented on Apr 17, 2017

    @OneSourceCat

    I don't think blacklist is a good mechanism to prevent this issue, because there are other Java Deserialized Gadgets or ClassLoaders can arise this problem including com.sun.org.apache.xalan which is in your list.

  11. 58 remaining items

  12. fv3386 commented on Dec 25, 2017

    @fv3386

    I use jackson-databind 2.9.3 which depends on jackson-annotations 2.9.0, will this cause problems? Do I need to upgrade all jackson related jars to 2.9.3?

  13. cowtowncoder commented on Dec 26, 2017

    @cowtowncoder
    Member

    @fasterxml-travis No: jackson-annotations is quite special in that it only declares annotation types, and as a general rule there should be no differences at all between all 2.9.x versions (and same for all 2.x minor patches). In Jackson 3.x we will only have 3.0, 3.1 and so on, to remove this one source of confusion.

    So: 2.9.0 is fine; 2.9.3 is also fine. They do not have code differences (*)

    (*) For sake of completeness: there happens to be one actual packaging difference: 2.9.1 and above have Java 9 module declaration compiled in. Otherwise patches are identical.

  14. ksuresh8 commented on Feb 1, 2018

    @ksuresh8

    does this vulnerability affect jackson-databind v2.3.3?

  15. cowtowncoder commented on Feb 1, 2018

    @cowtowncoder
    Member

    @ksuresh8 yes. All 2.x versions not specifically included as having the fix will have it.

  16. swankjesse commented on Feb 14, 2018

    @swankjesse

    Have you considered disabling this feature when the target field’s type is java.lang.Object, Comparable, etc.? That would quickly cut down the attack surface.

  17. cowtowncoder commented on Feb 14, 2018

    @cowtowncoder
    Member

    @swankjesse Unfortunately ability to use that base type is a big use case (equivalent of JDK serialization, with all the warts), so those can not really be blocked without breaking some of existing usage. Especially since library can not really determine if content is trusted or might come from untrusted source.

    But I think adding a MapperFeature that would add such limits is indeed something that might make sense -- and making that feature enabled by default for 3.0.

    That is the loose plan anyway, so that although it will be possible to allow unsafe (potentially unsafe) usage it should require bit more work. As things are one has to enable default typing (or unsafe base type for @JsonTypeInfo), but it is not obvious that there are security considerations.

    There is also some related discussion on #1866 as well as at:

    FasterXML/jackson3-dev#21

    although I may not have added an issue for MapperFeature to perhaps add in 2.9 (which is against SemVer, but 2.9 is likely the last 2.x version so... may be lesser evil. Unless I'll change my mind and do 2.10 yet)

  18. added a commit that references this issue on Feb 20, 2018
  19. added a commit that references this issue on Apr 26, 2020
  20. yiikou commented on Jul 9, 2021

    @yiikou

    Does anyone know when CVE-2017-7525 is going to be published in the NVD? I see that it was created at least as early as July 16, here it is November 2 and it's still not published.

    Hi @cowtowncoder , may I ask a off-topic question? When I try to following all the discussion above, I notice that you mention the cve-2017-7525 before it is published. Could you let me know how do you know it? (Do you guys already discuss it on other channels?)

  21. cowtowncoder commented on Jul 9, 2021

    @cowtowncoder
    Member

    @yiikou Whoever files an issue typically can see it before issue becomes publicly available -- and person filing usually sends email to a fasterxml dot com email (either mine, tatu, or general purpose info). This is usually where information comes from: CVE submitter is expected to contact the "vendor" (in this case, author(s) of the OSS package).

  22. yiikou commented on Jul 11, 2021

    @yiikou

    @yiikou Whoever files an issue typically can see it before issue becomes publicly available -- and person filing usually sends email to a fasterxml dot com email (either mine, tatu, or general purpose info). This is usually where information comes from: CVE submitter is expected to contact the "vendor" (in this case, author(s) of the OSS package).

    Thank you for the explanation. I got your point: you are either a CVE submitter or member of the vendor team, right? And please allow me to ask an additional question, would you have any concern about discussing this vulnerability before it is disclosed? Since the potential attackers may notice this vulnerability before it is patched, and leverage it to exploit product.

  23. cowtowncoder commented on Jul 11, 2021

    @cowtowncoder
    Member

    @yiikou right. I am involved in discussions happening outside of public CVE stream.

    As to discussions on issue tracker, it is bit of a balance: I usually do not include necessary details for reproduction for polymorphic type deserialization exploits (such as specific classes involved or properties/json used).
    If we are talking about this particular issue (CVE-2017-7525), it was patched years ago so discussion would be fine.

    Another source of information about exploit are actual block list additions; these do give some information on exploits themselves: not complete ones (since no reproduction is added as unit tests), but could be helpful for someone looking for reconstructing exploits.

    I am not aware of any actual real-world exploits against Jackson, for what that is worth. That does not mean there has not been any, could just be that those are not published in general, or that if they are no one related to Jackson has been notified.

  24. yiikou commented on Jul 11, 2021

    @yiikou

    @yiikou right. I am involved in discussions happening outside of public CVE stream.

    As to discussions on issue tracker, it is bit of a balance: I usually do not include necessary details for reproduction for polymorphic type deserialization exploits (such as specific classes involved or properties/json used).
    If we are talking about this particular issue (CVE-2017-7525), it was patched years ago so discussion would be fine.

    Another source of information about exploit are actual block list additions; these do give some information on exploits themselves: not complete ones (since no reproduction is added as unit tests), but could be helpful for someone looking for reconstructing exploits.

    I am not aware of any actual real-world exploits against Jackson, for what that is worth. That does not mean there has not been any, could just be that those are not published in general, or that if they are no one related to Jackson has been notified.

    Thank you for the explanation, I appreciateit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    CVEIssues related to public CVEs (security vuln reports)

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions