Uploaded image for project: 'Optimization Framework'
  1. Optimization Framework
  2. OPTFRA-454

CMSO - Mitigate sonatype-2017-0312 security vulnerability

XMLWordPrintable

    • Icon: Story Story
    • Resolution: Done
    • Icon: Medium Medium
    • Dublin Release
    • None
    • None
    • None
    • Dublin-4, Dublin-5

      Evaluate the actual exposure to sonatype-2017-0312 security vulnerability and miitigate the exposure, if any, or request a waiver. 

      Threat level 8

      com.fasterxml.jackson.core : jackson-databind : 2.9.8

       

      Required by SpringBoot

       

       

      Explnanation

      Explanation

      jackson-databind is vulnerable to Remote Code Execution (RCE). The createBeanDeserializer() function in the BeanDeserializerFactory class allows untrusted Java objects to be deserialized. A remote attacker can exploit this by uploading a malicious serialized object that will result in RCE if the application attempts to deserialize it.

       

      Note: This vulnerability exists due to the incomplete fix for CVE-2017-7525, CVE-2017-15095, CVE-2017-17485, CVE-2018-5968, CVE-2018-7489, CVE-2018-11307, CVE-2018-12022, CVE-2018-12023, CVE-2018-14718, CVE-2018-14719, CVE-2018-14720, and CVE-2018-14721. Evidence of this can be found at https://pivotal.io/security/cve-2017-4995:

       

      Jackson provides a blacklisting approach to protecting against this type of attack, but Spring Security should be proactive against blocking unknown “deserialization gadgets” when Spring Security enables default typing.

      Detection

      The application is vulnerable by using this component, when default typing is enabled and passing in untrusted data to be deserialization.

       

      Note: Spring Security has provided their own fix for this vulnerability (CVE-2017-4995). If this component is being used as part of Spring Security, then you are not vulnerable if you are running Spring Security 4.2.3.RELEASE or greater for 4.x or Spring Security 5.0.0.M2 or greater for 5.x.

       

      Recommendation

      There is no non vulnerable version of this component. We recommend investigating alternative components or a potential mitigating control.

       

      Workaround: Do not use the default typing. Instead you will need to implement your own.

       

      It is also possible to customize global defaulting, using ObjectMapper.setDefaultTyping(…) – you just have to implement your own TypeResolverBuilder (which is not very difficult); and by doing so, can actually configure all aspects of type information. Builder itself is just a short-cut for building actual handlers.

      Reference: https://github.com/FasterXML/jackson-docs/wiki/JacksonPolymorphicDeserialization

       

      Examples of implementing your own typing can be found by looking at Spring Security's fix or this Stack Overflow article.

       

      Root Cause

      SubTypeValidator.class : [2.9.6, )

      Advisories

      Attack: https://adamcaudill.com/2017/10/04/exploiting-jackson-rce-cv...

      Evidence: https://pivotal.io/security/cve-2017-4995

      CVSS Details

      Sonatype CVSS 3.0: 8.5

      CVSS Vector: CVSS:3.0/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H

       

            jf9860 jf9860
            jf9860 jf9860
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: