Every CVE Search/ Get API key

CVE-2022-0691

Authorization Bypass Through User-Controlled Key in unshiftio/url-parse

6.5 MediumFix available

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

2.22%Up 1.3 points since Feb 22, 2022
90%50%10%1%

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 MediumCVSS: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 MediumCVSS: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 MediumCVSS: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 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS 3.0
6.5 MediumCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N
CVSS 2.0
7.5 HighAV: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 MediumCVSS: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 CriticalCVSS: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 MediumCVSS: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 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS 3.0
6.5 MediumCVSS: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

Affected packages
PackageAffectedFixed
url-parse
npm
0.1.0 up to 1.5.9
1.5.9
url-parse
TuxCare: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-parse
Debian:12
before 1.5.9+~1.4.8-1
1.5.9+~1.4.8-1
node-url-parse
Debian:13
before 1.5.9+~1.4.8-1
1.5.9+~1.4.8-1
node-url-parse
Debian:14
before 1.5.9+~1.4.8-1
1.5.9+~1.4.8-1
node-url-parse
Debian: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-parse
Ubuntu: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-parse
Ubuntu: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-parse
Ubuntu:20.04:LTS
before 1.4.7-3ubuntu0.1, plus listed versions
1.4.7-3
1.4.7-3ubuntu0.1
node-url-parse
Ubuntu: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-parse
Ubuntu: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-parse
Ubuntu: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

History
RecordedChangedSources
affected, factsOSV
aliasesEUVD
first indexedCVE 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

Show 14 moreShow less
MoveEnter Open