url-parse Incorrectly parses URLs that include an '@'
Moderate severity
GitHub Reviewed
Published
Feb 18, 2022
to the GitHub Advisory Database
•
Updated Sep 11, 2023
Description
Published by the National Vulnerability Database
Feb 17, 2022
Published to the GitHub Advisory Database
Feb 18, 2022
Reviewed
Feb 22, 2022
Last updated
Sep 11, 2023
A specially crafted URL with an '@' sign but empty user info and no hostname, when parsed with url-parse, url-parse will return the incorrect href. In particular,
Will return:
If the 'hostname' or 'origin' attributes of the output from url-parse are used in security decisions and the final 'href' attribute of the output is then used to make a request, the decision may be incorrect.
References