CVE-2022-25839: Improper Input Validation in url-js

github.com/ntbosscher/gobase Updated 02 Oct 2025

Summary

01/07/2022
Yes i
Low
3.7

CVE-2022-2583: Race condition in github.com/ntbosscher/gobase. Affects github.com/ntbosscher/gobase versions < 0.7.2. Fixed in 0.7.2. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The package url-js is an npm package that provides URL parsing and manipulation functionality. It is commonly used in JavaScript applications to handle URLs. However, versions before 2.1.0 are vulnerable to an Improper Input Validation issue. This vulnerability arises from improper parsing of URLs, allowing for hostname spoofing. For example, the URLs http://localhostocalhost and http://localhost are treated as the same URL, even though the hostname is not correctly parsed as 'localhost' and the backslash is reflected as it is.

Vulnerability Detail

The Improper Input Validation vulnerability in url-js can have various ramifications. By spoofing the hostname, an attacker can deceive users into believing they are interacting with a trusted website or service. This can lead to phishing attacks, credential theft, or other malicious activities. The vulnerability is rated as MODERATE severity with a CVSS score of 5.3. The Common Weakness Enumeration (CWE) ID associated with this vulnerability is CWE-20.

How To Fix

Latest published version: v0.12.2 as of 23 Oct 2026

go get github.com/ntbosscher/gobase@v0.12.2

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

0.7.2

This is the first release that contains the fix.

go get github.com/ntbosscher/gobase@v0.7.2

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

There is no specific workaround mentioned for this vulnerability. The best course of action is to update the url-js package to the fixed version.

Conclusion

The url-js package before version 2.1.0 is vulnerable to an Improper Input Validation issue that allows for hostname spoofing. This can have serious security implications, including phishing attacks and credential theft. It is crucial to update the package to version 2.1.0 or later to mitigate this vulnerability. For further assistance or support in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for github.com/ntbosscher/gobase →

Share this vulnerability

FAQ

url-js is an npm package that provides URL parsing and manipulation functionality for JavaScript applications.

The vulnerability allows for hostname spoofing, which can lead to phishing attacks, credential theft, or other malicious activities.

The vulnerability is rated as MODERATE severity with a CVSS score of 5.3.

To fix this vulnerability, update the url-js package to version 2.1.0 or later.

There is no specific workaround mentioned for this vulnerability. Updating the package to the fixed version is the recommended solution.

References

How To Fix

Latest published version: v0.12.2 as of 23 Oct 2026

go get github.com/ntbosscher/gobase@v0.12.2

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

0.7.2

This is the first release that contains the fix.

go get github.com/ntbosscher/gobase@v0.7.2

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback