CVE-2022-0686: Url parse Authorization Bypass Through User-Controlled Key Vulnerability
CRITICALCVE-2022-0686 is a CRITICAL (CVSS 9.1) authorization bypass through user-controlled key vulnerability (CWE-639: Authorization Bypass Through User-Controlled Key) affecting Url parse libraries in the npm ecosystem. The issue involves authorization bypass through user-controlled key in url-parse. Remediation is available by upgrading affected packages to version 1.5.8.
CVE-2022-0686 at a Glance
Security Impact
CVSS: 9.1
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N).
How to Fix CVE-2022-0686
To remediate this vulnerability, upgrade all affected Url parse dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install url-parse@1.5.8
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls url-parse
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2022-0686, inspect your project dependencies using npm:
npm ls url-parse
Analyze the terminal output to locate any version of Url parse in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.5.8), your application is affected.
Note: The npm ls url-parse command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-639: Authorization Bypass Through User-Controlled Key, where the system's authorization functionality does not prevent one user from gaining access to another user's data or record by modifying the key value identifying the data. In Url parse, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2022-0686 Affected Url parse Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
url-parse
|
npm |
< 1.5.8
|
1.5.8
|
References
Frequently Asked Questions
What is CVE-2022-0686?
Which Url parse versions are affected?
What version fixes CVE-2022-0686?
Is url-parse affected?
What is the CVSS score of CVE-2022-0686?
What CWE is associated with CVE-2022-0686?
How can I check npm dependencies for CVE-2022-0686?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-hgjh-723h-mx2j",
"modified" : "2022-03-03T19:19:03Z",
"published" : "2022-02-21T00:00:21Z",
"aliases" : [ "CVE-2022-0686" ],
"summary" : "Authorization Bypass Through User-Controlled Key in url-parse",
"details" : "url-parse prior to version 1.5.8 is vulnerable to Authorization Bypass Through User-Controlled Key.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "url-parse"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.5.8"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-0686"
}, {
"type" : "WEB",
"url" : "https://github.com/unshiftio/url-parse/commit/d5c64791ef496ca5459ae7f2176a31ea53b127e5"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/unshiftio/url-parse"
}, {
"type" : "WEB",
"url" : "https://huntr.dev/bounties/55fd06cd-9054-4d80-83be-eb5a454be78c"
}, {
"type" : "WEB",
"url" : "https://lists.debian.org/debian-lts-announce/2023/02/msg00030.html"
}, {
"type" : "WEB",
"url" : "https://security.netapp.com/advisory/ntap-20220325-0006"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-639" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2022-02-23T21:26:48Z",
"nvd_published_at" : "2022-02-20T13:15:00Z"
}
}