This vulnerability reveals a class of flaw that validation-focused security tooling fundamentally cannot catch: the injection happens after validation, during recomposition, exploiting the structural assumptions of URI parsing rather than bypassing them.
The attack vector is the recompose step itself. Applications that validate untrusted input as a URI string, safely extract its components, then rebuild the URI from those components remain vulnerable — because the rebuild introduces a malformed authority without triggering any validation error. The re-parse confirms the attacker's host as legitimate. Any security control relying on 'validate input, then safely use the parsed result' is bypassed if the library reconstructs URIs, which is common in templating, redirect handling, and proxying code.
The CVSS 7.5 rating reflects network-adjacent injection with no authentication, but actual exploitability hinges on whether an application both accepts untrusted port data AND rebuilds URIs from it — a specific pattern that may be less common than the download count suggests. Audit your code for parse→modify→serialize chains, particularly in URI template libraries, proxy frameworks, and any redirect logic that reconstructs URLs from parsed components.
Two non-obvious exposure vectors warrant attention. First, the 'equal' function (comparing normalized URIs) triggers authority recomposition internally — security checks comparing normalized URIs could produce false negatives, allowing an attacker-controlled URI to equal a trusted one. Second, malformed input in comparison operations could cause recomposeAuthority to throw, creating a denial-of-service vector where attackers craft input that breaks your URI comparison machinery entirely, forcing fallback to slower code paths or exposing error handlers never meant for untrusted input.
The fix enforces RFC 3986 digit-only ports in recomposeAuthority. This is correct but creates a silent API contract change: applications treating the library as pure serialization with their own upstream port validation may now have redundant checks, or worse, may remove their validation assuming fast-uri owns this invariant. Watch for this forward-looking assumption atrophy in dependency reviews. The vulnerable pattern won't surface in tests — the library now silently rejects malformed ports rather than erroring, leaving no audit trail of the formerly trusted behavior.