Koa Open Redirect via Referrer Header (User-Controlled)
链接: https://github.com/advisories/GHSA-jgmv-j7ww-jx2x
仓库 Star: 35585
CVSS 评分: 3.5
参考链接:
https://github.com/koajs/koa/security/advisories/GHSA-jgmv-j7ww-jx2x
https://github.com/koajs/koa/commit/422c551c63d00f24e2bbbdf492f262a5935bb1f0
描述:
Summary
In the latest version of Koa, the back method used for redirect operations adopts an insecure implementation, which uses the user-controllable referrer header as the redirect target.
Details
on the API document https://www.koajs.net/api/response#responseredirecturl-alt, we can see:
response.redirect(url, [alt])
1 |
|
however, the “back” method is insecure:
1 |
|
Referrer Header is User-Controlled.
PoC
there is a demo for POC:
1 |
|
Proof Of Concept
1 |
|
Impact
Koa Open Redirect via Referrer Header (User-Controlled)
http://example.com/2025/07/29/github_2406450342/