SecurityContext

CVE-2022-25839: url-js - Hostname Spoofing

  • Cve: CVE-2022-25839
  • Name: url-js - Hostname Spoofing
  • 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.
  • Impact: Attackers can spoof hostnames, potentially leading to phishing or man-in-the-middle attacks.
  • Remediation: Update to version 2.1.0 or later.
  • Vulnerability impact: man_in_the_middle
  • Requirement type: none
  • Labels source: projectdiscovery
  • Severity: medium
  • Cvss score: 5.3
  • Cvss vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
  • Epss score: 0.00849
  • Epss percentile: 0.59069
  • Assignee: [email protected]
  • Published at: 2022-03-11T20:15:09Z
  • Age in days: 1719
  • Modified at: 2026-06-17T04:34:22Z
  • Patch available: yes
  • Public exploits total: 1
  • References total: 2
  • Products total: 1
  • Oss: yes
  • Projects total: 1
  • Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2022-25839
  • Nvd status: modified
  • Checked, none or zero: known exploited entries, nuclei templates, public exploits capped, rejected by nvd
  • Not known: vulnerability type, requirements, hackerone

Cwe

IdName
CWE-20Improper Input Validation

Public exploits

UrlSourceAdded date
https://snyk.io/vuln/SNYK-JS-URLJS-2414030nvd2022-03-11

References

UrlSourceTags
https://github.com/duzun/URL.js/commit/9dc9fcc99baa4cbda24403d81a589e9b0f4121d0nvdPatch, Third Party Advisory
https://snyk.io/vuln/SNYK-JS-URLJS-2414030nvdExploit, Patch, Third Party Advisory

Products

ProductAffectedPlatform boundSourcesUrl
url-js_project:url-js< 2.1.0nonvd/v1/products/url-js_project/url-js

Projects

RepositoryLink kindsIndexedUrl
duzun/URL.jscommit, fix, packageyes/v1/repositories/duzun/URL.js

Index

  • Checked, none or zero: repositories, repositories high signal, packages

Exploitation

  • Public exploit: yes
  • Public exploit count: 1
  • Public exploit first date: 2022-03-11
  • Remote: yes
  • Checked, none or zero: known exploited, known exploited by, exploitation seen, initial access, authentication required
  • Not known: known exploited since, vulncheck known exploited since, nuclei template, initial access since, hackerone reports, exposed hosts