Improper Input Validation Affecting org.webjars.bowergithub.unshiftio:url-parse package, versions [0,]


Severity

Recommended
0.0
high
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of concept
EPSS
0.11% (46th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Improper Input Validation vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JAVA-ORGWEBJARSBOWERGITHUBUNSHIFTIO-543310
  • published27 Jan 2020
  • disclosed27 Jan 2020
  • creditronperris

Introduced: 27 Jan 2020

CVE-2020-8124  (opens in a new tab)
CWE-20  (opens in a new tab)

How to fix?

There is no fixed version for org.webjars.bowergithub.unshiftio:url-parse.

Overview

org.webjars.bowergithub.unshiftio:url-parse is a Small footprint URL parser that works seamlessly across Node.js and browser environments.

Affected versions of this package are vulnerable to Improper Input Validation. When using url-parse in the browser the protocol of the URL returned by the parser is not validated correctly. In the Node.js environment strings like, javascript: return empty strings on the resulting URL object, but in the browser document.location.protocol is used when the provided URL doesn't match the validation expression /^([a-z][a-z0-9.+-]*:)?(\/\/)?([\S\s]*)/i.

PoC by ronperris

 assume(parse.extractProtocol(' javscript:')).eql({
        slashes: false,
        protocol: '',
        rest: ''
      })

References

CVSS Scores

version 3.1