Skip to content
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

[security issue] fix populate injecting provider into source schema argument #414

Merged
merged 1 commit into from
Jul 3, 2018

Conversation

antarasi
Copy link
Contributor

@antarasi antarasi commented Jul 2, 2018

Summary

Populate hook is modifying original options argument in place causing provider field being injected into all subsequent populate calls.

If the first populate call has been done with provider = undefined (for instance by restrictToOwner hook), populate inject this provider into original options. The second call from rest provider is performed with provider = undefined because that value was injected into options in previous popolate call.

Such behavior is a severe security issue making possible to fetch related objects bypassing owner check.

More detailed description is given here:
https://bitbucket.org/AntaraSI/feathers-populate-test

@eddyystop eddyystop merged commit 5a89ead into feathersjs-ecosystem:master Jul 3, 2018
@eddyystop
Copy link
Collaborator

eddyystop commented Jul 3, 2018

You spent a long time tracking this issue down. Thank you very much for that.

Published as 4.14.1

@antarasi
Copy link
Contributor Author

antarasi commented Jul 3, 2018

True... Almost two weeks of tracking random "No auth token" errors. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants