Leading white space bypasses protocol validation
Description
Published to the GitHub Advisory Database
Mar 3, 2022
Reviewed
Mar 3, 2022
Published by the National Vulnerability Database
Mar 3, 2022
Last updated
Feb 3, 2023
Impact
Whitespace characters are not removed from the beginning of the protocol, so URLs are not parsed properly and protocol validation mechanisms may fail.
Patches
Patched in 1.19.9
Workarounds
Remove leading whitespace from values before passing them to URI.parse (e.g. via
.href(value)
ornew URI(value)
), e.g. by usingReferences
For more information
If you have any questions or comments about this advisory:
References