CWE
639
Advisory Published
Advisory Published
Updated

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

First published: Thu 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.

Credit: security@huntr.dev

Affected SoftwareAffected VersionHow to fix
npm/url-parse<1.5.7
1.5.7
Url-parse Project Url-parse<1.5.7
IBM Data Virtualization on Cloud Pak for Data<=3.0
IBM Watson Query with Cloud Pak for Data as a Service<=2.2
IBM Watson Query with Cloud Pak for Data as a Service<=2.1
IBM Watson Query with Cloud Pak for Data as a Service<=2.0
IBM Data Virtualization on Cloud Pak for Data<=1.8
IBM Data Virtualization on Cloud Pak for Data<=1.7

Never miss a vulnerability like this again

Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.

Parent vulnerabilities

(Appears in the following advisories)

Frequently Asked Questions

  • 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.

  • What is the severity of CVE-2022-0639?

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

  • 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.

  • 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.

  • 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.
© 2025 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203