Reject internal IPs when verifying user controlled domains (SSRF)#6450
Open
cnkk wants to merge 2 commits into
Open
Reject internal IPs when verifying user controlled domains (SSRF)#6450cnkk wants to merge 2 commits into
cnkk wants to merge 2 commits into
Conversation
…ification URLs) get dereferenced by an outbound HTTP client. A public hostname can resolve to a private/loopback/link-local address (e.g. cloud metadata at 169.254.169.254) and turn a verification fetch into an internal request. Add Plausible.SSRFProtection to classify resolved IPs and guard the request path in three layers: - syntactic check at add-time rejects literal IPs and dot-less hosts - resolve-time check rejects hosts whose A or AAAA records are internal - a Req response step refuses redirects whose Location is internal IPv6 classification re-checks IPv4 embedded in mapped, IPv4-compatible, NAT64, and 6to4 addresses.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Prevents resolving to internal IPs when running domain verifications (SSO, Installation verification)