# CVE-2022-25839: Improper Input Validation

- Severity: Medium 4.3 (CVSS:3.1, scored by snyk) `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N/E:P`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.85%, higher than 59% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2022-03-11T20:00:15.762Z
- Modified: 2026-07-08T06:49:35.009Z
- Also known as: GHSA-rf54-44jr-q5vf, SNYK-JS-URLJS-2414030
- Weaknesses: CWE-20
- Assigned by: snyk

## 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.

(As written by CVE List.)

## Affected

- url-js: from unspecified before 2.1.0
- url-js (npm): before 2.1.0
- url-js_project url-js: before 2.1.0

## Every score

- snyk: CVSS:3.1 4.3 Medium `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N/E:P`
- GitHub: CVSS:3.1 5.3 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N`
- NVD: CVSS:3.1 5.3 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N`
- NVD: CVSS:2.0 5.0 Medium `AV:N/AC:L/Au:N/C:N/I:P/A:N`

## References

- <https://snyk.io/vuln/SNYK-JS-URLJS-2414030> (exploit, patch, third-party-advisory, web)
- <https://github.com/duzun/URL.js/commit/9dc9fcc99baa4cbda24403d81a589e9b0f4121d0> (patch, third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2022-25839> (advisory)
- <https://github.com/duzun/URL.js> (package)

## Sources

- CVE List: [CVE-2022-25839](https://www.cve.org/CVERecord?id=CVE-2022-25839), CVE Terms of Use, modified 2024-09-16
- GitHub Advisory Database: [GHSA-rf54-44jr-q5vf](https://github.com/advisories/GHSA-rf54-44jr-q5vf), CC-BY-4.0, modified 2026-07-08
- NVD: [CVE-2022-25839](https://nvd.nist.gov/vuln/detail/CVE-2022-25839), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2022-25839 · Whole record: https://cve.day/CVE-2022-25839.json · Rebuilt by cve.day 2026-11-25T22:58:10.064Z
