Open Redirect Affecting org.webjars.npm:node-forge package, versions [,1.3.1)


Severity

Recommended
0.0
medium
0
10

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

Threat Intelligence

Exploit Maturity
Proof of concept
EPSS
0.07% (35th 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 Open Redirect vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JAVA-ORGWEBJARSNPM-2330876
  • published6 Jan 2022
  • disclosed6 Jan 2022
  • creditready-research

Introduced: 6 Jan 2022

CVE-2022-0122  (opens in a new tab)
CWE-601  (opens in a new tab)

How to fix?

Upgrade org.webjars.npm:node-forge to version 1.3.1 or higher.

Overview

org.webjars.npm:node-forge is a WebJar for node-forge.

Affected versions of this package are vulnerable to Open Redirect via parseUrl function when it mishandles certain uses of backslash such as https:/\/\/\ and interprets the URI as a relative path.

PoC:


// poc.js
var forge = require("node-forge");
var url = forge.util.parseUrl("https:/\/\/\www.github.com/foo/bar");
console.log(url);

// Output of node poc.js:

{ full: 'https://', scheme: 'https', host: '', port: 443, path: '/www.github.com/foo/bar&#39;, <<<---- path should be "/foo/bar" fullHost: '' }

CVSS Scores

version 3.1