flannel-io / flannel

flannel is a network fabric for containers, designed for Kubernetes
Apache License 2.0
8.81k stars 2.87k forks source link

IsPrivate Bypass #1958

Open aydinnyunus opened 6 months ago

aydinnyunus commented 6 months ago

Hi Team,

I found possible SSRF and Open Redirect Vulnerability on the https://github.com/flannel-io/flannel/blob/master/pkg/backend/wireguard/wireguard_network.go#L127

You can find the POC on the following Playground link. The IsPrivate function did not check all of the internal URLs. So you can use IsLinkLocalUnicast, IsLinkLocalMulticast, IsLoopback functions to do that.

stale[bot] commented 2 weeks ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.