Vulnerability library
Security checkFebruary 03, 2026

url-parse incorrectly parses hostname / protocol due to unstripped leading control characters.

Understand the exposure, see the recommended fix, and check whether your own website has related weaknesses.

Medium severitynpmurl-parse

Check your website

Find this and other vulnerabilities with a free scan.

Your scan runs on your computer. No account required.

Description

Leading control characters in a URL are not stripped when passed into url-parse. This can cause input URLs to be mistakenly be interpreted as a relative URL without a hostname and protocol, while the WHATWG URL parser will trim control characters and treat it as an absolute URL.

Recommendation

Update the url-parse package to the latest compatible version. Followings are version details:

  • Affected version(s): >= 0.1.0, < 1.5.9
  • Patched version(s): 1.5.9

References

Could your website be exposed too?

SmartScanner can check your website for url-parse incorrectly parses hostname / protocol due to unstripped leading control characters. and gives you actionable findings to investigate.

Start a free scan

Related Issues

See something that needs correcting? Let us knowUpdated February 03, 2026