aliyun-openapi-java-sdk icon indicating copy to clipboard operation
aliyun-openapi-java-sdk copied to clipboard

Latest version has vulnerable dependency

Open davidbernick opened this issue 8 years ago • 8 comments

According to SourceClear, https://www.sourceclear.com/vulnerability-database/libraries/230, Jackson-databind is vulnerable. Can we use another library?

Jackson-databind is vulnerable to remote code execution (RCE) attacks. Attackers can exploit an incomplete fix of `CVE-2017-7525` to bypass the blacklist when Spring libraries are available on the class path. In order to be vulnerable to this attack, either the use of `@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS)` or `@JsonTypeInfo(use = JsonTypeInfo.Id.MINIMAL_CLASS)` or a call to `ObjectMapper.enableDefaultTyping(...)` is needed.

davidbernick avatar Aug 30 '18 02:08 davidbernick

https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-17485 too

davidbernick avatar Aug 30 '18 02:08 davidbernick

PR: https://github.com/aliyun/aliyun-openapi-java-sdk/pull/55

Will try to figure out CLA stuff, but I'm happy if someone else just makes the modifications too.

kshakir avatar Sep 07 '18 14:09 kshakir

Please show us why this issue is related to aliyun-openapi-java-sdk and re-open this issue. Thank you.

Qingtang-SDK avatar Oct 29 '18 10:10 Qingtang-SDK

Hi @Qingtang-SDK - as you can see in #55 aliyun-openapi-java-sdk embeds the vulnerable version of Jackson. The PR #55 resolves that by upgrading Jackson to a version which does not have the security vulnerability.

geoffjentry avatar Oct 30 '18 20:10 geoffjentry

Hi, @geoffjentry Thanks for your feedback, and thank you for your contribution to this SDK. I apologize for closing this issue without carefully checking. We tried your pull request, and unfortunately, some functional test cases were failed with it. Now we are trying to find a JSON library which is secure and compatible with our SDK.

We will fix this issue as soon as possible, and keep you informed. Thank you, and we are sorry for your inconvenience. If you have any question, please let us know how to help.

Qingtang-SDK avatar Oct 31 '18 15:10 Qingtang-SDK

Hi, @kshakir @geoffjentry @davidbernick Thanks for your patient. We have changed our JSON library dependency from jackson-mapper-dsl 1.9.13 to jackson-databind 2.9.7, in the newest repo of master branch, and aliyun-java-sdk-batchcompute 6.0.0 on maven. All tests have been passed.

Thanks again for your great patient. Please take a look. If you have any question, please don't hesitate to let us know.

Qingtang-SDK avatar Nov 05 '18 09:11 Qingtang-SDK

This looks great! We have tests to run on our side I believe this particular issue can now be marked as closed.

FYI for others that may come across this issue, there is still transitive dependency on the same vulnerable Jackson 1.x library over in the OSS Java SDK, but that one is easier to work around using dependency exclusions.

kshakir avatar Nov 06 '18 00:11 kshakir

Let's close this issue now. Thanks all.

JacksonTian avatar Dec 18 '18 08:12 JacksonTian