freshfox/firestore-storage

A typed wrapper around Firestore including a query-builder and an in-memory implementation for testing.
Vulnerabilities 1 via 14 paths
Dependencies 159
Source GitHub
Commit fd519ec8

Find, fix and prevent vulnerabilities in your code.

Severity
  • 1
Status
  • 1
  • 0
  • 0
medium severity
new

Man-in-the-Middle (MitM)

  • Vulnerable module: https-proxy-agent
  • Introduced through: firebase-admin@8.6.0 and @google-cloud/firestore@2.4.0

Detailed paths

  • Introduced through: firestore-storage@freshfox/firestore-storage#fd519ec89e81d0710ce8bed58b6b24415232d668 firebase-admin@8.6.0 @google-cloud/storage@3.5.0 gaxios@2.0.1 https-proxy-agent@2.2.2
    Remediation: Open PR to patch https-proxy-agent@2.2.2.
  • Introduced through: firestore-storage@freshfox/firestore-storage#fd519ec89e81d0710ce8bed58b6b24415232d668 firebase-admin@8.6.0 @google-cloud/storage@3.5.0 gcs-resumable-upload@2.3.0 gaxios@2.0.1 https-proxy-agent@2.2.2
    Remediation: Open PR to patch https-proxy-agent@2.2.2.
  • Introduced through: firestore-storage@freshfox/firestore-storage#fd519ec89e81d0710ce8bed58b6b24415232d668 @google-cloud/firestore@2.4.0 google-gax@1.7.5 google-auth-library@5.5.0 gaxios@2.0.1 https-proxy-agent@2.2.2
    Remediation: Open PR to patch https-proxy-agent@2.2.2.
  • Introduced through: firestore-storage@freshfox/firestore-storage#fd519ec89e81d0710ce8bed58b6b24415232d668 firebase-admin@8.6.0 @google-cloud/storage@3.5.0 gcs-resumable-upload@2.3.0 google-auth-library@5.5.0 gaxios@2.0.1 https-proxy-agent@2.2.2
    Remediation: Open PR to patch https-proxy-agent@2.2.2.
  • Introduced through: firestore-storage@freshfox/firestore-storage#fd519ec89e81d0710ce8bed58b6b24415232d668 @google-cloud/firestore@2.4.0 google-gax@1.7.5 google-auth-library@5.5.0 gtoken@4.1.0 gaxios@2.0.1 https-proxy-agent@2.2.2
    Remediation: Open PR to patch https-proxy-agent@2.2.2.
  • Introduced through: firestore-storage@freshfox/firestore-storage#fd519ec89e81d0710ce8bed58b6b24415232d668 firebase-admin@8.6.0 @google-cloud/storage@3.5.0 @google-cloud/common@2.2.2 google-auth-library@5.5.0 gaxios@2.0.1 https-proxy-agent@2.2.2
    Remediation: Open PR to patch https-proxy-agent@2.2.2.
  • Introduced through: firestore-storage@freshfox/firestore-storage#fd519ec89e81d0710ce8bed58b6b24415232d668 firebase-admin@8.6.0 @google-cloud/firestore@2.4.0 google-gax@1.7.5 google-auth-library@5.5.0 gaxios@2.0.1 https-proxy-agent@2.2.2
    Remediation: Open PR to patch https-proxy-agent@2.2.2.
  • Introduced through: firestore-storage@freshfox/firestore-storage#fd519ec89e81d0710ce8bed58b6b24415232d668 @google-cloud/firestore@2.4.0 google-gax@1.7.5 google-auth-library@5.5.0 gcp-metadata@3.2.0 gaxios@2.0.1 https-proxy-agent@2.2.2
    Remediation: Open PR to patch https-proxy-agent@2.2.2.
  • Introduced through: firestore-storage@freshfox/firestore-storage#fd519ec89e81d0710ce8bed58b6b24415232d668 firebase-admin@8.6.0 @google-cloud/firestore@2.4.0 google-gax@1.7.5 google-auth-library@5.5.0 gcp-metadata@3.2.0 gaxios@2.0.1 https-proxy-agent@2.2.2
    Remediation: Open PR to patch https-proxy-agent@2.2.2.
  • Introduced through: firestore-storage@freshfox/firestore-storage#fd519ec89e81d0710ce8bed58b6b24415232d668 firebase-admin@8.6.0 @google-cloud/storage@3.5.0 @google-cloud/common@2.2.2 google-auth-library@5.5.0 gtoken@4.1.0 gaxios@2.0.1 https-proxy-agent@2.2.2
    Remediation: Open PR to patch https-proxy-agent@2.2.2.
  • Introduced through: firestore-storage@freshfox/firestore-storage#fd519ec89e81d0710ce8bed58b6b24415232d668 firebase-admin@8.6.0 @google-cloud/firestore@2.4.0 google-gax@1.7.5 google-auth-library@5.5.0 gtoken@4.1.0 gaxios@2.0.1 https-proxy-agent@2.2.2
    Remediation: Open PR to patch https-proxy-agent@2.2.2.
  • Introduced through: firestore-storage@freshfox/firestore-storage#fd519ec89e81d0710ce8bed58b6b24415232d668 firebase-admin@8.6.0 @google-cloud/storage@3.5.0 gcs-resumable-upload@2.3.0 google-auth-library@5.5.0 gcp-metadata@3.2.0 gaxios@2.0.1 https-proxy-agent@2.2.2
    Remediation: Open PR to patch https-proxy-agent@2.2.2.
  • Introduced through: firestore-storage@freshfox/firestore-storage#fd519ec89e81d0710ce8bed58b6b24415232d668 firebase-admin@8.6.0 @google-cloud/storage@3.5.0 @google-cloud/common@2.2.2 google-auth-library@5.5.0 gcp-metadata@3.2.0 gaxios@2.0.1 https-proxy-agent@2.2.2
    Remediation: Open PR to patch https-proxy-agent@2.2.2.
  • Introduced through: firestore-storage@freshfox/firestore-storage#fd519ec89e81d0710ce8bed58b6b24415232d668 firebase-admin@8.6.0 @google-cloud/storage@3.5.0 gcs-resumable-upload@2.3.0 google-auth-library@5.5.0 gtoken@4.1.0 gaxios@2.0.1 https-proxy-agent@2.2.2
    Remediation: Open PR to patch https-proxy-agent@2.2.2.

Overview

https-proxy-agent is a module that provides an http.Agent implementation that connects to a specified HTTP or HTTPS proxy server, and can be used with the built-in https module.

Affected versions of this package are vulnerable to Man-in-the-Middle (MitM). When targeting a HTTP proxy, https-proxy-agent opens a socket to the proxy, and sends the proxy server a CONNECT request. If the proxy server responds with something other than a HTTP response 200, https-proxy-agent incorrectly returns the socket without any TLS upgrade. This request data may contain basic auth credentials or other secrets, is sent over an unencrypted connection. A suitably positioned attacker could steal these secrets and impersonate the client.

PoC by Kris Adler

var url = require('url');
var https = require('https');
var HttpsProxyAgent = require('https-proxy-agent');

var proxyOpts = url.parse('http://127.0.0.1:80');
var opts = url.parse('https://www.google.com');
var agent = new HttpsProxyAgent(proxyOpts);
opts.agent = agent;
opts.auth = 'username:password';
https.get(opts);

Remediation

Upgrade https-proxy-agent to version 3.0.0 or higher.

References