KoaJS Koa Open Redirect Vulnerability in HTTP Header Handler

Vulnerability

An open redirect vulnerability has been identified in KoaJS Koa versions through 3.0.0. The issue arises in the 'back' method of the HTTP Header Handler component, specifically within the 'lib/response.js' file. This vulnerability allows for redirection to arbitrary URLs by manipulating the user-controlled Referrer header. The flaw can be exploited remotely, potentially facilitating phishing attacks.

Impact

Exploitation of this vulnerability allows for open redirect, where users can be redirected to malicious sites, increasing the risk of phishing attacks.

Reproduction

To reproduce this vulnerability, set up a KoaJS application using a version prior to 3.0.0. Create a route that uses the 'back' method for redirection. When a request is made to this route with a manipulated Referrer header, the application will redirect to the URL specified in the header, demonstrating the open redirect vulnerability.

Added: Jul 25, 2025, 5:21 AM
Updated: Jul 25, 2025, 5:21 AM

Vulnerability Rating

Custom Algorithm
spread
0.0
impact
0.6
exploitability
7.7
remediation
0.0
relevance
0.3
threat
6.4
urgency
2.9
incentive
1.7

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.