What’s Vulnerable › Vulnerabilities
CVE-2022-25839: Improper Input Validation
- Severity: medium (CVSS 5.3 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.8% probability of exploitation in the next 30 days
- Public exploit or detection template: yes
- Published: 2022-03-11 · updated 2026-06-17
- Weakness: CWE-20
Description
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.
Affected products
- url-js: before 2.1.0 — fixed in 2.1.0
How to fix
Upgrade to a fixed version: url-js 2.1.0. Check the vendor advisory for mitigations.
References
- https://github.com/duzun/URL.js/commit/9dc9fcc99baa4cbda24403d81a589e9b0f4121d0
- https://snyk.io/vuln/SNYK-JS-URLJS-2414030
- https://github.com/duzun/URL.js/commit/9dc9fcc99baa4cbda24403d81a589e9b0f4121d0
- https://snyk.io/vuln/SNYK-JS-URLJS-2414030
Get alerted when CVE-2022-25839 or the next vulnerability affects your stack