-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Enable prototype pollution protection in TSVB #78908
Comments
Pinging @elastic/kibana-app (Team:KibanaApp) |
cc @timroes |
@joshdover do you think it would make sense to export this method from core, so every HTTP service could use it instead of copying that code over? |
I guess in theory we want all routes to use strict validation schemes. But that's not always possible (e.g. when piping through Elasticsearch dsl) - for these cases one approach would be to introduce a new option as part of |
* Enable prototype pollution protection in TSVB Closes #78908 * Update Dock API Changes * Replace logging failed in validateObject validation with 400 error * Move validateObject to kbn-std package and add a description * Update Doc API Changes * Rename validateObject function to ensureNoUnsafeProperties * Rename other validateObject occurrences Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Enable prototype pollution protection in TSVB Closes elastic#78908 * Update Dock API Changes * Replace logging failed in validateObject validation with 400 error * Move validateObject to kbn-std package and add a description * Update Doc API Changes * Rename validateObject function to ensureNoUnsafeProperties * Rename other validateObject occurrences Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Enable prototype pollution protection in TSVB Closes #78908 * Update Dock API Changes * Replace logging failed in validateObject validation with 400 error * Move validateObject to kbn-std package and add a description * Update Doc API Changes * Rename validateObject function to ensureNoUnsafeProperties * Rename other validateObject occurrences Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Diana Derevyankina <54894989+DziyanaDzeraviankina@users.noreply.github.com> Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Currently the TSVB endpoint in
kibana/src/plugins/vis_type_timeseries/server/routes/vis.ts
Line 43 in 75a1459
To put some protection in place, the same logic as used in core should be applied, failing the request if some known malicious keys are specified somewhere in the request object:
kibana/src/core/server/http/prototype_pollution/validate_object.ts
Line 34 in 1c415e0
We should still strive to complete the strict schema to cover all possible configurations in the long term.
Tasks:
validateObject
helper method from core so it's usable in plugins as wellThe text was updated successfully, but these errors were encountered: