CVE-2022-0691
Authorization Bypass Through User-Controlled Key in unshiftio/url-parse
Authorization Bypass Through User-Controlled Key in NPM url-parse prior to 1.5.9.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- Low
- Integrity
- Low
- Availability
- None
Exploit likelihood
What each source reports
CVE List Score used
6.5
Authorization Bypass Through User-Controlled Key in unshiftio/url-parse
Authorization Bypass Through User-Controlled Key in NPM url-parse prior to 1.5.9.
- Record
CVE-2022-0691- CVSS 3.0
- 6.5 Medium
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N - Weakness
- CWE-639
- Updated
- 2026-11-02
EUVDEUVD-2022-1074
6.5
Authorization Bypass Through User-Controlled Key in NPM url-parse prior to 1.5.9.
- Record
EUVD-2022-1074- CVSS 3.0
- 6.5 Medium
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N - Updated
- 2026-11-03
GitHub AdvisoriesGHSA-jf5r-8hm2-f872
6.5
url-parse incorrectly parses hostname / protocol due to unstripped leading control characters.
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.
If url-parse is used in security decisions involving the hostname / protocol, and the input URL is used in a client which uses the WHATWG URL parser, the decision may be incorrect.
This can also lead to a cross-site scripting (XSS) vulnerability if url-parse is used to check for the javascript: protocol in URLs. See following example:
const parse = require('url-parse')
const express = require('express')
const app = express()
const port = 3000
url = parse(\"\\bjavascript:alert(1)\")
console.log(url)
app.get('/', (req, res) => {
if (url.protocol !== \"javascript:\") {res.send(\"<a href=\\'\" + url.href + \"\\'>CLICK ME!</a>\")}
})
app.listen(port, () => {
console.log(`Example app listening on port ${port}`)
})
- Record
GHSA-jf5r-8hm2-f872- CVSS 3.0
- 6.5 Medium
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N - Weakness
- CWE-639
- Updated
- 2026-11-02
NVD
9.8
Authorization Bypass Through User-Controlled Key in NPM url-parse prior to 1.5.9.
- Record
CVE-2022-0691- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - CVSS 3.0
- 6.5 Medium
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N - CVSS 2.0
- 7.5 High
AV:N/AC:L/Au:N/C:P/I:P/A:P - Weakness
- CWE-639
- Updated
- 2026-11-02
OSV
6.5
Authorization Bypass Through User-Controlled Key in unshiftio/url-parse
Authorization Bypass Through User-Controlled Key in NPM url-parse prior to 1.5.9.
- Record
CVE-2022-0691- CVSS 3.0
- 6.5 Medium
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N - Weakness
- CWE-639
- Updated
- 2026-11-02
OSVDEBIAN-CVE-2022-0691
9.8
Authorization Bypass Through User-Controlled Key in NPM url-parse prior to 1.5.9.
- Record
DEBIAN-CVE-2022-0691- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-03
Show 4 moreShow less
OSVGHSA-jf5r-8hm2-f872
6.5
url-parse incorrectly parses hostname / protocol due to unstripped leading control characters.
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.
If url-parse is used in security decisions involving the hostname / protocol, and the input URL is used in a client which uses the WHATWG URL parser, the decision may be incorrect.
This can also lead to a cross-site scripting (XSS) vulnerability if url-parse is used to check for the javascript: protocol in URLs. See following example:
const parse = require('url-parse')
const express = require('express')
const app = express()
const port = 3000
url = parse(\"\\bjavascript:alert(1)\")
console.log(url)
app.get('/', (req, res) => {
if (url.protocol !== \"javascript:\") {res.send(\"<a href=\\'\" + url.href + \"\\'>CLICK ME!</a>\")}
})
app.listen(port, () => {
console.log(`Example app listening on port ${port}`)
})
- Record
GHSA-jf5r-8hm2-f872- CVSS 3.0
- 6.5 Medium
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N - Weakness
- CWE-639
- Updated
- 2026-11-02
OSVUBUNTU-CVE-2022-0691
9.8
Authorization Bypass Through User-Controlled Key in NPM url-parse prior to 1.5.9.
- Record
UBUNTU-CVE-2022-0691- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - CVSS 3.0
- 6.5 Medium
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N - Updated
- 2026-11-02
OSVCLSA-2026-1776904628 No score
TuxCare security update for url-parse (6 CVEs)
TuxCare rebuilt url-parse to address 6 CVEs. Fixed in 1.4.7-tuxcare.1.
- Record
CLSA-2026-1776904628- Updated
- 2026-11-02
OSVUSN-5973-1 No score
node-url-parse vulnerabilities
It was discovered that url-parse incorrectly handled certain inputs. If a user or an automated system were tricked into opening a specially crafted input file, a remote attacker could possibly use this issue to cause a denial of service, or to perform a server-side request forgery attack or open redirect attack. (CVE-2018-3774)
It was discovered that url-parse incorrectly handled certain inputs. If a user or an automated system were tricked into opening a specially crafted input file, a remote attacker could possibly use this issue to bypass input validation. This issue was only fixed in Ubuntu 18.04 LTS and Ubuntu 20.04 LTS. (CVE-2020-8124)
Yaniv Nizry discovered that url-parse incorrectly handled certain inputs. If a user or an automated system were tricked into opening a specially crafted input file, a remote attacker could possibly use this issue to cause a denial of service, or to perform a server-side request forgery attack or open redirect attack. This issue was only fixed in Ubuntu 18.04 LTS and Ubuntu 20.04 LTS. (CVE-2021-27515)
It was discovered that url-parse incorrectly handled certain inputs. If a user or an automated system were tricked into opening a specially crafted input file, a remote attacker could possibly use this issue to cause a denial of service, or to perform a server-side request forgery attack or open redirect attack. This issue was only fixed in Ubuntu 18.04 LTS and Ubuntu 20.04 LTS. (CVE-2021-3664)
It was discovered that url-parse incorrectly handled certain inputs. If a user or an automated system were tricked into opening a specially crafted input file, a remote attacker could possibly use this issue to bypass authorization. This issue was only fixed in Ubuntu 18.04 LTS and Ubuntu 20.04 LTS. (CVE-2022-0512, CVE-2022-0639, CVE-2022-0691)
Rohan Sharma discovered that url-parse incorrectly handled certain inputs. If a user or an automated system were tricked into opening a specially crafted input file, a remote attacker could possibly use this issue to bypass authorization. This issue was only fixed in Ubuntu 18.04 LTS and Ubuntu 20.04 LTS. (CVE-2022-0686)
- Record
USN-5973-1- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
url-parsenpm |
0.1.0 up to 1.5.9 | 1.5.9 |
url-parseTuxCare:npm From an advisory covering 6 CVEs |
1.4.7-tuxcare.0 up to 1.4.7-tuxcare.1, plus listed versions 1.4.7 |
1.4.7-tuxcare.1 |
node-url-parseDebian:12 |
before 1.5.9+~1.4.8-1 | 1.5.9+~1.4.8-1 |
node-url-parseDebian:13 |
before 1.5.9+~1.4.8-1 | 1.5.9+~1.4.8-1 |
node-url-parseDebian:14 |
before 1.5.9+~1.4.8-1 | 1.5.9+~1.4.8-1 |
node-url-parseDebian:10 From an advisory covering 6 CVEs |
before 1.2.0-2+deb10u2, plus listed versions 1.2.0-21.2.0-2+deb10u1 |
1.2.0-2+deb10u2 |
node-url-parseUbuntu:Pro:16.04:LTS |
before 1.0.5-2ubuntu0.1~esm2, plus listed versions 1.0.5-11.0.5-2 |
1.0.5-2ubuntu0.1~esm2 |
node-url-parseUbuntu:18.04:LTS |
before 1.2.0-1ubuntu0.1, plus listed versions 1.0.5-21.2.0-1 |
1.2.0-1ubuntu0.1 |
node-url-parseUbuntu:20.04:LTS |
before 1.4.7-3ubuntu0.1, plus listed versions 1.4.7-3 |
1.4.7-3ubuntu0.1 |
node-url-parseUbuntu:Pro:16.04:LTS From an advisory covering 8 CVEs |
before 1.0.5-2ubuntu0.1~esm2, plus listed versions 1.0.5-11.0.5-2 |
1.0.5-2ubuntu0.1~esm2 |
node-url-parseUbuntu:18.04:LTS From an advisory covering 8 CVEs |
before 1.2.0-1ubuntu0.1, plus listed versions 1.0.5-21.2.0-1 |
1.2.0-1ubuntu0.1 |
node-url-parseUbuntu:20.04:LTS From an advisory covering 8 CVEs |
before 1.4.7-3ubuntu0.1, plus listed versions 1.4.7-3 |
1.4.7-3ubuntu0.1 |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected, facts | OSV | |
| aliases | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2022-0691 is a medium vulnerability (CVSS 6.5) in Unshiftio Unshiftio/url-parse, published February 21, 2022. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 2.22%, the 82nd percentile. Fixed in url-parse 1.5.9.
References
huntr.dev/bounties/57124ed5-4b68-4934-8325-2c546257f2e4
github.com/unshiftio/url-parse/commit/0e3fb542d60ddbf6933f22eb9b1e06e25eaa5b63
security.netapp.com/advisory/ntap-20220325-0006
lists.debian.org/debian-lts-announce/2023/02/msg00030.html
nvd.nist.gov/vuln/detail/CVE-2022-0691
github.com/github/advisory-database/pull/6765
Show 14 moreShow less
github.com/advisories/GHSA-jf5r-8hm2-f872
github.com/CVEProject/cvelistV5/tree/main/cves/2022/0xxx/CVE-2022-0691.json
security-tracker.debian.org/tracker/CVE-2022-0691
github.com/unshiftio/url-parse
ubuntu.com/security/CVE-2022-0691
ubuntu.com/security/notices/USN-5973-1
cve.org/CVERecord?id=CVE-2022-0691
ubuntu.com/security/CVE-2018-3774
ubuntu.com/security/CVE-2020-8124
ubuntu.com/security/CVE-2021-3664
ubuntu.com/security/CVE-2021-27515
ubuntu.com/security/CVE-2022-0512
ubuntu.com/security/CVE-2022-0639
ubuntu.com/security/CVE-2022-0686