43 points · by JensRantil · 7y ago · 29 comments
They're not general vulnerabilities in the library. They surface when people use a documented-dangerous function in a stupid way.
Obviously this stuff (security disclosure) isn't easy but with such a pervasive library near monthly findings is a growing chore.
Additionally, 2.10 deprecates the unsafe behavior and introduces a new, safer alternative. See the blog post for more information there. [1] That might be a valid reason to spend time upgrading.
Obviously, if you're actually affected, then yes, upgrading or backporting patches is a good idea.
[0]: https://news.ycombinator.com/item?id=21171746
[1]: https://medium.com/@cowtowncoder/on-jackson-cves-dont-panic-...
So it's an intense cycle.
A great step might be for libraries to note when their implementation of a package is safe.
Stuff like this warrants a followup, but you have to have a good option in your vulnerability management to accept a vulnerable dependency (especially if - unlike this case - the upgrade path is not available or requires extensive other upgrades). In any case, casual high-rated CVEs for library edge cases like this contribute a lot to "alarm fatigue".
Despite the CVE database being problematic for libraries, there's no real alternative for answering the question "do my dependencies have security problems?", so you've got to accomodate.
1. JSON content is sent by an untrusted client
2. Must have one of those libraries in classpath: Logback, HikariCP, commons-dbcp, P6Spy
3. Default typing must be enabled with enableDefaultTyping (very insecure, if your program has this, it's insecure even after this patch)
4. There must be a property with permissive type (such as Object, Serializable, Comparable, Cloneable, and so on)
[1] https://medium.com/@cowtowncoder/on-jackson-cves-dont-panic-...
https://blog.sonatype.com/jackson-databind-remote-code-execu...
The only reliable fix is surely stopping serialization of arbitrary classes by not using or auditting any use of the DefaultTyping feature.
Curious as to what makes you think this - I was under the impression you needed to explicitly call `enableDefaultTyping` to get this unsafe behaviour. The wiki page explicitly tells you not to do this with untrusted input and the method is deprecated in the latest versions of the library.
https://github.com/FasterXML/jackson-databind/issues/2195
https://github.com/FasterXML/jackson-docs/wiki/JacksonPolymo...
Here is a much better blog by the library author themself: https://medium.com/@cowtowncoder/on-jackson-cves-dont-panic-...
It seems like it's a blacklist of types to not automatically de-serialize? If so, that's.... not good.
It must be noted that the vast majority of Jackson use cases is not affected, you need to enable an optional feature that has been known to be unsafe for years [1]
[1] https://medium.com/@cowtowncoder/on-jackson-cves-dont-panic-...
https://medium.com/@cowtowncoder/on-jackson-cves-dont-panic-...
The most recent relates to blocking yet another gadget:
https://github.com/FasterXML/jackson-databind/issues/2478
As another commenter mentions, this whole set of issues is only a problem if you call enableDefaultTyping during setup, and then deserialise data from untrusted sources. Doubtless, there are people doing this. But don't.
https://github.com/FasterXML/jackson-databind/issues/2478 Block two more gadget types (commons-dbcp, p6spy, CVE-2019-16942 / CVE-2019-16943)
https://medium.com/@cowtowncoder/on-jackson-cves-dont-panic-...
# Safe Default Typing (safe Polymorphic Deserialization) https://medium.com/@cowtowncoder/jackson-2-10-features-cd880...
In other words, it’s quite difficult to do without running some scanning process designed to look for this library, and for specific versions of it that are vulnerable.
The other jackson packages are mostly Java package hierarchy that don't affect this CVE (jackson-core, jackson-bom, jackson-parent, and jackson-annotations -- but we've also updated all of these to 2.10 on F30+).
So:
rpm -qa | grep jackson-databind
To the GGP:As noted by other commenters just having the package isn't sufficient. You need a number of other libraries (most of which aren't shipped with Fedora, none of which are shipped on RHEL) on the classpath of the running JVM.
If you're not running any Java code, you're definitely not affected. If you're using any code distributed through the official channels, it is very unlikely that you're affected. You'll probably only be affected if you're using third-party projects. Which as always, are run at your own risk. :)
[0]: Source: co-maintainer of the package via the Fedora Stewardship SIG.
F30 Bodhi: https://bodhi.fedoraproject.org/updates/FEDORA-2019-b1715548... F31 Bodhi: https://bodhi.fedoraproject.org/updates/FEDORA-2019-cf87377f...