-
Notifications
You must be signed in to change notification settings - Fork 9.8k
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
Disable forwarding redirect for peer's HTTP communication #16969
Comments
Discussed during sig etcd triage meeting on 23/11/2023. Assigned to @ivanvc to investigate remaining etcd peer http interactions. |
Happy to help. Can you assign it to me? Thanks |
Another area to check out are endpoints from |
If I understand correctly, we need to update the HTTP client from the following locations:
As for the raft routes, I think they're safe as There's also a request in |
Thanks @ivanvc - I can't see how these additional http clients could be abused but I also don't see the harm in just disabling following redirects for them as to the best of my knowledge they should not be needed by etcd. My vote would go to raising a pull request to update all of these instances to not follow redirects. Perhaps leave it a few days to see if maintainers or other contributors have any different views on it. |
Hey @jmhbnz, I saw you added the backport v3.5 label. Should I cherry-pick my commit and create a new PR targeting the |
Hey @ivanvc - Yes given this was a security concern my view is we should backport this to Note - the codebase structure can be quite different going back to I will re-open until we get the backport merged, thanks for your help on this @ivanvc 🙏🏻 |
@jmhbnz I think we can close the ticket now unless we want to backport it to another version. |
Hey @ahrtr do you think we should be trying to backport an update for this to 3.4? It is security related so probably, but defer to you as release manager for the branch. |
Yes, please backport the fix to 3.4 as well. Thanks. |
Oops I didn't see this before. I will do it. |
What would you like to be added?
It's possible that etcd server may run into SSRF (Server-side request forgery) when adding a new member. If users provide a malicious peer URL, the existing etcd members may be redirected to other unexpected internal URL when getting the new member's version,
etcd/server/etcdserver/cluster_util.go
Line 250 in a9cf27b
We should disable the forwarding redirect for the endpoint
/version
, as there is no need to support it.We should also evaluate all peer's HTTP communication, and disable the redirect as well if needed.
etcd/server/etcdserver/api/etcdhttp/peer.go
Lines 61 to 75 in d0114cf
Why is this needed?
Improve security
The text was updated successfully, but these errors were encountered: