CVE-2022-0122
JavaScript vulnerability analysis and mitigation

Overview

CVE-2022-0122 is a URL Redirection to Untrusted Site vulnerability affecting the node-forge package, which has over 16 million weekly downloads. The vulnerability was discovered in the parseUrl function within the utils.js file, affecting versions up to (excluding) 1.0.0. The package is widely used by major companies including Cisco, Microsoft, and Alexa for implementing key security functions, Transport Layer Security protocol, and cryptographic functions in native JavaScript (Sonatype Blog).

Technical details

The vulnerability stems from a broken regular expression in the parseUrl function that incorrectly validates URL strings. The regex accepts anything that starts with http[s]:// and doesn't properly split the URL groups, resulting in an empty or insecure host with everything else thrown into the path portion. The CVSS v3.1 base score is 6.1 (Medium) with a vector string of CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N (NVD).

Impact

The vulnerability could allow an attacker to bypass URL parsing security controls. When exploited, it could enable an attacker to redirect victims to malicious clients through the createClient function or potentially bypass authorization checks through the withinCookieDomain function. This could lead to sensitive information exposure when victims are connected to rogue clients (Sonatype Blog).

Mitigation and workarounds

The vulnerability was fixed in version 1.0.0 of node-forge by removing the insecure parseUrl function and replacing it with the WHATWG URL Standard. For applications using older versions that require URL parsing functionality, implementing a URL polyfill is recommended. Additionally, proper sanitization of user input before processing is advised as a general security practice (Github Commit).

Additional resources


SourceThis report was generated using AI

Related JavaScript vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-55182CRITICAL10
  • JavaScriptJavaScript
  • react
NoYesDec 03, 2025
CVE-2025-66401CRITICAL9.8
  • JavaScriptJavaScript
  • mcp-watch
NoNoDec 01, 2025
CVE-2025-66412HIGH8.5
  • JavaScriptJavaScript
  • @angular/compiler
NoYesDec 01, 2025
CVE-2025-66415MEDIUM6.9
  • JavaScriptJavaScript
  • @fastify/reply-from
NoYesDec 01, 2025
CVE-2025-66405MEDIUM6.9
  • JavaScriptJavaScript
  • @portkey-ai/gateway
NoYesDec 01, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management