-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove or extract default typing #2258
Comments
There is no real way to do that for 2.x, unfortunately, so we'll be stuck with this one for 2.10:
but approach for 3.x is open. My thinking has been that yes, one MUST EXPLICITLY specify validator that is allowing everything, and that if such permissive validator is provided, its name contains "Unsafe" or something similar to indicate. So I think we are thinking along same lines here? At tactical level I think that with issue #2195 to included in 2.10 it will be easier for frameworks to provide reasonable defaults, as well as for users to provide Allow-list approaches. Does this make sense? |
The main thing that I would want to see is that it is clear, beyond any shadow of doubt, that any configuration that doesn't use an explicit whitelist, is running in a mode that is vulnerable to exploitation, such that when security researchers try to raise vulnerabilities, the response can be "no, this vulnerability only exists when a user has explicitly and consciously opted into a mode that enables this vulnerability". I would rather remove all black lists from Jackson (perhaps they can be supplied in documentation), since the existence of a black list may cause people to trust it, and it's when people trust it that a new class that is vulnerable and not in the black list might be considered a vulnerability. Push it on the user to maintain the lists, and then that pushes the vulnerabilities to the user code, rather than in Jackson. |
@jroper So, first, it would be important to be able to know for sure that a user is not using unsafe settings. But the problem in getting there is due to 2 dimensions:
Starting with (2), simple immediate removal of functionality (or methods to enable it) should not be done in a minor release, ideally. But given that migration from 2.x to 3.0 will take literally years, doing nothing is not a good option either. But the tricky part, I think, is the (1). Specifically I do not object to changing "ObjectMapper.enableDefaultTyping()" (and variations) to require passing of something that indicates allowed class names to use. I do have minor disagreement on whether Jackson ought to maintain blacklist (to me it seems that at least on short term, it should, although separated out in modular way). Perhaps answer there is a separate module that just contains implementation for Blacklist-backed verifier. So far so good. But the problem is the annotation part. It is not so much that of configuring validator: I think mechanism used for "default typing" could suffice as the baseline. But what I worry about are users using So. I would like to brainstorm the specific way to deal with:
What would be mechanisms to
|
FWIW to the best of my understanding, these issues should not be assigned CVEs at all. Quoting https://cve.mitre.org/cve/cna/rules.html#Appendix_C
Since users of the library need to opt into the feature enabling these vulnerabilities in the first place (something that many of us don't), I'd argue these CVEs are incorrectly assigned to jackson-databind. I recommend someone from this project reach out to the CNAs assigning these CVEs (MITRE, mostly, AFAICT) to get clarity here. |
Update for concurrent progress:
This is somewhat orthogonal to question of 3.x, although with these settings 2.11 can be locked down to same level as what 3.0 has by default (i.e. not allowing use of potentially unsafe base types at all without explicit configuration to allow that). |
As a downstream project that depends on Jackson, Jackson's default typing feature is a PITA. The feature, by design, enables remote code execution. Personally I don't understand how all these CVE vulnerabilities that essentially say "Jacksons remote code execution feature allows remote code execution" come to exist, they aren't vulnerabilities, they are Jackson working exactly as documented and intended. But it causes a pain for us because every time a new way to use Jacksons remote code execution feature to execute remote code is found, we get multiple notifications from people using and auditing our dependencies saying "OMG! PLAY FRAMEWORK HAS A SECURITY VULNERABILITY". And surely given the incredibly wide use of Jackson, we're not the only project that feels this.
I think the feature should be removed from the core of Jackson databind. Perhaps the necessary plug in points to make it possible to implement the feature by a separate module could be left behind, this would ensure that the people that really need the ability to shoot themselves in the foot still can - is there a Darwin awards for IT security? But this wouldn't just make things easier for us (and Jackson itself), it will also protect users that don't realise just how dangerous the feature is, because it will introduce friction, they won't just be able to discover and enable the method, they'll have to actually add a new dependency. Preferably the module would not even be related to FasterXML, so that automated scans and other reports wouldn't associate the CVEs reported against it with sensible use of Jackson. I suggest a group id of:
io.danger.will.robinson
.The text was updated successfully, but these errors were encountered: