The fast-uri vulnerability (CVE-2026-76172) exploits a fundamental mismatch between what the parser validates and what the resolver actually uses. When a URI like http%2F%2Fevil.com arrives, parse() reports no host, no scheme error, no authority—making it appear safe to allowlists that check parsed.host === undefined. But resolve() or normalize() applies a different code path that re-encodes the decoded content differently than the parsing path inspected, producing a network-path reference that re-parses to evil.com as the authority. The security-relevant operation happens after your check, using a representation your check never saw.

The root cause is asymmetric transformation: the library decodes the scheme component during parse but doesn't re-escape it during serialization, while the host path does the opposite. Input that passes validation in one representation becomes dangerous in another. This is compounded by a legacy decoder that expands non-standard percent-encoding forms that upstream filters never anticipated.

For defenders: verify whether your application allowlists or validates on the parsed structure, then passes that same object to resolve, normalize, or any resolution-adjacent operation. If so, you're in the false-confidence state—the library told you the input was safe, but the resolution path will use something different. The fix is to reject invalid schemes after decoding (the library's patch), but you should also treat all decoded URI components as untrusted input requiring re-validation before security decisions.

This pattern—checking one representation and operating on another—is not unique to fast-uri. When implementing URI handling in any library, treat decoding and serialization as security-relevant transformations, not presentation details. Validate after the full transformation pipeline completes, not after the initial parse.