Wiz Agents & Workflows are here

CVE-2025-62595
JavaScript vulnerability analysis and mitigation

Overview

A bypass vulnerability (CVE-2025-62595) was discovered in the Koa.js framework affecting versions 2.16.2 to before 2.16.3 and 3.0.1 to before 3.0.3. The vulnerability impacts the back redirect functionality, where attackers can manipulate the Referer header to force a user's browser to navigate to external, potentially malicious websites. This occurs because the implementation incorrectly treats specially crafted URLs as safe relative paths (GitHub Advisory).

Technical details

The vulnerability exists in the back redirect logic where the code attempts to treat values that start with '/' as safe relative paths and only perform origin checks for absolute URLs. However, protocol-relative URLs (beginning with //host) also start with '/' and match the startsWith('/') branch. This allows an attacker to supply a protocol-relative referrer like //evil.com that gets treated as a safe relative path, but browsers interpret Location: //evil.com as a redirect to https://evil.com or http://evil.com depending on context. The vulnerability has a CVSS v3.1 score of 4.3 (Medium) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N (GitHub Advisory).

Impact

An attacker who can cause a victim to visit a specially crafted link or inject a request with a controlled Referer header can redirect the victim to an attacker-controlled domain. This vulnerability can be exploited for phishing attacks, social engineering, or bypassing protection rules that rely on same-origin navigation (GitHub Advisory).

Mitigation and workarounds

The vulnerability has been patched in versions 2.16.3 and 3.0.3. The fix involves not treating //host as a safe relative path and explicitly excluding protocol-relative values from any relative-path branch. The Referer should be normalized by resolving it with a base (e.g., new URL(rawRef, ctx.href)), then comparing resolved.origin to ctx.origin before allowing the redirect (GitHub Advisory, 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

GHSA-3hfp-gqgh-xc5gCRITICAL9.6
  • JavaScriptJavaScript
  • @lightdash/cli
NoYesApr 02, 2026
CVE-2026-34950CRITICAL9.1
  • JavaScriptJavaScript
  • fast-jwt
NoNoApr 02, 2026
CVE-2026-34752HIGH8.7
  • JavaScriptJavaScript
  • haraka
NoYesApr 02, 2026
CVE-2026-34825HIGH8.5
  • JavaScriptJavaScript
  • @nocobase/plugin-workflow-sql
NoYesApr 02, 2026
GHSA-ccgf-5rwj-j3hvLOW2.1
  • JavaScriptJavaScript
  • telejson
NoYesApr 02, 2026

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