-
-
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
Allow customization of polymorphic deserialization black-list #2208
Comments
Btw, I'm aware that a black-list is generally not a great security control. I highly appreciate the suggestion to provide white-listing facilities instead, as proposed in #2195. However, it seems that such white-listing would be optional, and I'm worried that many users might neglect it. Thus I believe, that the black-listing mechanism should still be improved. IMHO allowing users to extend the black-list would be a step forward here. If anyone agrees, I'll be happy to submit a PR for this. But I'd like to discuss first, how configuration should work from a user perspective. Some ideas:
|
Any thoughts on this, anyone? |
First of all, apologies for late response. I did notice issue but forgot to follow up. This issue has been discussed on few occasions on mailing lists, which are better place to discuss things. But you can see my thinking on #2195 which I think is closer to second option you mention. Plan would be to add new abstraction/config hook in 2.10 as 3.0 is still quite a long way out. Also: sort of related -- I am thinking of starting some sort of process for writing proposals (Jackson Enhancement Proposals?). See "Big Ideas" entry on: https://github.com/FasterXML/jackson-future-ideas/wiki/Jackson-Work-in-Progress and maybe wiki on: https://github.com/FasterXML/jackson-future-ideas/wiki Anyway: the idea would be to write simple (usually/ideally :) ) proposals of high-level change idea. Something bit more than an issue (since work may be done under multiple issues), as basis for discussion, collaboration. |
Sorry, I'm not on the mailing lists, and did not check the archives. I had read #2195, and I was under the impression that that one was more related to local measures. I.e. something that users would have to declare in Now that I re-read #2195 and also jackson3-dev #21 it seems that you also plan to support the proposed handler API globally, i.e. at the level of a Btw, I appreciate the idea of a new handler API that addresses these problem. However, I still think it would be worthwhile to simply improve configurability of the |
Yes, the idea would be to allow configuring that handler on |
…implementation: ExtensibleSubTypeValidator.
I should have read this through with more thought, and get back to my thinking. So, I do not think configurability of |
I like the idea to have a way to configure the blacklist. I am just wondering if it might make sense to introduce a system property (or security property) which contains a list of additional classes to @meeque @cowtowncoder What do you think? |
I do not plan on configurability of the black list explicitly, although #2195 will allow users to use blocking over allowing if they want to. Jackson does not use system properties, and this is a design principle: System properties are global configuration that works poorly with otherwise isolated instances of |
My PR #2269 and the related discussions did not seem to lead anywhere useful. Please feel free to close this issue without a fix. |
In the past Jackson Databind has had numerous vulnerabilities that were related to polymorphic deserialization. In particular, many classes turn out to be insecure when deserialized from untrusted data. These classes are often called deserialization gadgets.
Jackson Databind has addressed such vulnerabilities by maintaining a black-list of classes that must not be deserialized. However, new classes are often identified to be deserialization gadgets, and the black-list needs to be extended frequently.
Right now (checked on 2.9.7 sources and on master) there is no convenient way for users of Jackson Databind to extend the black-list. In particular, users would have to either modify the Jackson Databind sources or re-implement several classes of Jackson Databind.
Instead, it would be great if users could extend the blacklist by means of configuration. This would have the following benefits:
(If such classes are not published as open source, it is unlikely that they will ever make it on the built-in black-list that is maintained by Jackson Databind.)
(This may be important for users who cannot readily upgrade to the latest Jackson Databind release. It can also help closing the time-gap between classes being proposed for the built-in black-list and an actual release that contains the updated black-list.)
The text was updated successfully, but these errors were encountered: