CVE-2022-0639: Authorization Bypass Through User-Controlled Key in unshiftio/url-parse

Published Feb 17, 2022
·
Updated

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,

js parse(\"http://@/127.0.0.1\") Will return: yaml { slashes: true, protocol: 'http:', hash: '', query: '', pathname: '/127.0.0.1', auth: '', host: '', port: '', hostname: '', password: '', username: '', origin: 'null', href: 'http:///127.0.0.1' } 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.

Other sources

An authorization bypass flaw was found in url-parse. This flaw allows a local unauthenticated attacker to add an at symbol (@) while submitting a URL. This issue enables the bypass of validation or block-listing restrictions.

Authorization Bypass Through User-Controlled Key in NPM url-parse prior to 1.5.7.

unshift.io url-parse module for NPM could allow a remote attacker to bypass security restrictions, caused by incorrect conversion of @ in protocol in the href. By sending a specially-crafted request, an attacker could exploit this vulnerability to bypass hostname validation.

IBM

Affected Software

8 affected componentsFixes available
npm/url-parse<1.5.7
1.5.7
IBM Data Virtualization on Cloud Pak for Data<=3.0
IBM Watson Query on Cloud Pak for Data<=2.2
IBM Watson Query on Cloud Pak for Data<=2.1
IBM Watson Query on Cloud Pak for Data<=2.0
IBM Data Virtualization on Cloud Pak for Data<=1.8
IBM Data Virtualization on Cloud Pak for Data<=1.7
Url-parse Project Url-parse Node.js<1.5.7

Event History

Feb 17, 2022
CVE Published
via MITRE·12:00 AM
Data Sourced
12:00 AM
RemedyDescriptionSeverityWeaknessAffected Software
Data Sourced
via MITRE·12:00 AM
DescriptionSeverityWeakness
Data Sourced
via NVD·06:15 PM
RemedyDescriptionSeverityWeaknessAffected Software
Feb 18, 2022
Advisory Published
12:00 AM
Feb 23, 2022
Data Sourced
via Red Hat·12:05 PM
DescriptionSeverityAffected Software
Aug 15, 2025
Data Sourced
via IBM·03:29 PM
DescriptionAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is CVE-2022-0639?

CVE-2022-0639 is a vulnerability that allows for authorization bypass through a user-controlled key in NPM url-parse prior to version 1.5.7.

2

What is the severity of CVE-2022-0639?

The severity of CVE-2022-0639 is medium with a CVSS score of 6.5.

3

How does CVE-2022-0639 work?

CVE-2022-0639 is triggered by a specially crafted URL with an '@' sign but empty user info and no hostname, causing url-parse to return an incorrect href.

4

Which software is affected by CVE-2022-0639?

NPM url-parse versions prior to 1.5.7 and the Url-parse Project url-parse are affected by CVE-2022-0639.

5

How can CVE-2022-0639 be fixed?

To fix CVE-2022-0639, update NPM url-parse to version 1.5.7 or higher.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203