Repository navigation
Refuse bracketed and trailing-dot IP literals in normalize/2 - #987
Merged
Merged
Conversation
The connect path drops a [...] pair and the resolver ignores a trailing dot, so %5B%3A%3A1%5D and 127.0.0.1. passed the IP-literal gate and still reached the address. Strip both before the gate.
benoitc
force-pushed
the
fix/normalize-ip-literal-forms
branch
from
October 25, 2026 20:44
14b3399 to
f19561a
Compare
Merged
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.
The IP-literal check in
hackney_url:normalize/2(added for CVE-2026-47076) parsed the decoded host as is, while the connect path drops a surrounding[...]and the resolver ignores a trailing dot. A percent-encoded bracketed IPv6 address (%5B%3A%3Affff%3A127%2E0%2E0%2E1%5D) or an IP with a trailing dot (127.0.0.1.) therefore passed the check and still connected to the literal address, including through a redirect.The check now strips one bracket pair and one trailing dot before parsing. Domain names with a trailing dot and unencoded IPv6 literals are unaffected.
Reported by euriconicacio (GHSA-5643-rgxx-pfw7).