Quick answers
- Is CVE-2022-0639 exploited in the wild?
- No. Junglewise Threat Intelligence has no report of CVE-2022-0639 being exploited in the wild.
- How severe is CVE-2022-0639?
- Low severity, with a CVSS score of 3, published 18 February 2022.
- Which products and versions are affected?
- url-parse (npm) SEMVER:introduced=1.0.0,fixed=1.5.7.
- Is there a fix for CVE-2022-0639?
- Yes. url-parse (npm): upgrade to 1.5.7 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
- How is CVE-2022-0639 attacked?
- It is attacked over the network.
- Am I affected by CVE-2022-0639?
- Check whether you run url-parse (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.
How to fix
- url-parse (npm): upgrade to 1.5.7 or later
npm install url-parse@1.5.7
Technical details
url-parse incorrectly handles URLs with an '@' character where userinfo is empty and hostname is missing, such as "http://@/127.0.0.1". The vulnerability is a URL parsing bypass due to CWE-639 (authorization bypass through user-controlled key). When such a URL is parsed, the library returns an empty hostname and origin but a non-empty href, potentially transforming an invalid URL into a valid one. If security logic relies on the hostname or origin field to validate a URL, an attacker can craft a specially-formed URL that passes validation but results in a different target when the href is used to make a request. The fix, committed to version 1.5.7, re-adds empty userinfo to the href when appropriate to preserve the original invalid URL structure.
Affected products
- unshiftio url-parse 1.0.0 through 1.5.6
Identifiers
- CVE-2022-0639
- GHSA-8v38-pw62-9cw2
Timeline
- 2022-02-18: disclosed
- 2022-02-22: patched: Fix committed; version 1.5.7 released