CVE-2022-25839 Improper Input Validation

Medium 4.3 Published Updated

An attacker can spoof hostnames in the url-js library by exploiting improper input validation during URL parsing, potentially bypassing security checks.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2022-25839?

CVE-2022-25839 is a medium-severity vulnerability in url-js, published on 11 Mar 2022. Any signed-in user can exploit it over the network, with no action from the victim.

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

Weakness: CWE-20

Which versions are affected by CVE-2022-25839?

2 open source packages ship an affected version, including url-js. It affects 1 product.

PackageAffectedFixed in
url-js npmAll versions2.1.0
url-js npmAll versions2.1.0

Products include Url-Js Project Url-Js.

How do I fix CVE-2022-25839?

Upgrade url-js to 2.1.0 or later.

Is CVE-2022-25839 being exploited?

There is no known exploitation of CVE-2022-25839 in the wild and no public exploit code.

Sources

Also known as GHSA-rf54-44jr-q5vf, SNYK-JS-URLJS-2414030.

Is CVE-2022-25839 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free