CVE-2022-25839
MEDIUM 5.3CVSS 3.1Improper Input Validation in url-js
The package url-js before 2.1.0 are vulnerable to Improper Input Validation due to improper parsing, which makes it is possible for the hostname to be spoofed. http://\\\\localhost and http://localhost are the same URL. However, the hostname is not parsed as localhost, and the backslash is reflected as it is.
- Published
- 11 Mar 2022
- Last modified
- 8 Jul 2026
- Assigned by
- report@snyk.io
- NVD status
- Modified
- Weakness
- CWE-20
- Also known as
- GHSA-rf54-44jr-q5vfSNYK-JS-URLJS-2414030
- Sources
- NVDJSONOSV GHSA-rf54-44jr-q5vfJSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | MEDIUM 5.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N |
| OSV | GitHub | CVSS 3.1 | MEDIUM 5.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N |
| NVD | report@snyk.io (Secondary) | CVSS 3.1 | MEDIUM 4.3 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N |
| NVD | nvd@nist.gov (Primary) | CVSS 2.0 | MEDIUM 5.0 | AV:N/AC:L/Au:N/C:N/I:P/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | url-js_project | url-jscpe:2.3:a:url-js_project:url-js:*:*:*:*:*:node.js:*:* |
< 2.1.0 | 2.1.0 |
| OSV | npm | url-js | < 2.1.0 | 2.1.0 |
References
- https://github.com/duzun/URL.js/commit/9dc9fcc99baa4cbda24403d81a589e9b0f4121d0 · Patch, Third Party Advisory, WEB
- https://snyk.io/vuln/SNYK-JS-URLJS-2414030 · Exploit, Patch, Third Party Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2022-25839 · ADVISORY
- https://github.com/duzun/URL.js · PACKAGE
History
- 25 Nov 2026 20:34 UTC · NVD: first stored (published 11 Mar 2022)
- 25 Nov 2026 20:11 UTC · OSV: first stored (published 12 Mar 2022)