CVE-2020-8135: @uppy/companion Server-Side Request Forgery Vulnerability

HIGH
Advisory Identifier: GHSA-mm7r-265w-jv6f
CWE-918
Published
Advisory Summary

CVE-2020-8135 is a HIGH server-side request forgery vulnerability (CWE-918: Server-Side Request Forgery (SSRF)) affecting @uppy/companion libraries in the npm ecosystem. The issue involves server-side request forgery in @uppy/companion. Remediation is available by upgrading affected packages to version 1.9.3.

CVE-2020-8135 at a Glance

CVE Identifier CVE-2020-8135
GHSA Identifier GHSA-mm7r-265w-jv6f
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-918: Server-Side Request Forgery (SSRF)
Affected Product @uppy/companion
Package Ecosystem npm
Published Date
Last Updated

How to Fix CVE-2020-8135

To remediate this vulnerability, upgrade all affected @uppy/companion dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

@uppy/companion fixed: 1.9.3
npm install @uppy/companion@1.9.3
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls @uppy/companion

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2020-8135, inspect your project dependencies using npm:

npm ls @uppy/companion

Analyze the terminal output to locate any version of @uppy/companion in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.9.3), your application is affected.

Note: The npm ls @uppy/companion command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-918: Server-Side Request Forgery (SSRF), where the web server receives a url or similar request from an upstream component and retrieves the contents of this url, but it does not sufficiently ensure that the request is being sent to the expected destination. In @uppy/companion, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

Versions of `@uppy/companion` prior to 1.9.3 are vulnerable to Server-Side Request Forgery (SSRF). The `get` route passes the user-controlled variable `req.body.url` to a GET request without sanitizing the value. This allows attackers to inject arbitrary URLs and make GET requests on behalf of the server. ## Recommendation Upgrade to version 1.9.3 or later.

CVE-2020-8135 Affected @uppy/companion Versions

1 component(s)
Fixed Versions:
1.9.3
Product / Package Ecosystem Affected Versions Fixed Version
@uppy/companion
npm
< 1.9.3
1.9.3

References

Frequently Asked Questions

What is CVE-2020-8135?
CVE-2020-8135 is a security vulnerability in @uppy/companion involving Server-Side Request Forgery in @uppy/companion under CWE-918: Server-Side Request Forgery (SSRF).
Which @uppy/companion versions are affected?
Affected versions include releases prior to 1.9.3 across affected packages: @uppy/companion.
What version fixes CVE-2020-8135?
Upgrading to 1.9.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @uppy/companion affected?
Yes, @uppy/companion is affected in releases prior to 1.9.3. Upgrade your dependency to 1.9.3 or later.
What CWE is associated with CVE-2020-8135?
CVE-2020-8135 is classified under CWE-918: Server-Side Request Forgery (SSRF) (The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.).
How can I check npm dependencies for CVE-2020-8135?
Run the dependency tree command: 'npm ls @uppy/companion'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-mm7r-265w-jv6f",
  "modified" : "2020-08-31T19:01:35Z",
  "published" : "2020-09-03T15:51:19Z",
  "aliases" : [ "CVE-2020-8135" ],
  "summary" : "Server-Side Request Forgery in @uppy/companion",
  "details" : "Versions of `@uppy/companion` prior to 1.9.3 are vulnerable to Server-Side Request Forgery (SSRF). The `get` route passes the user-controlled variable `req.body.url` to a GET request without sanitizing the value. This allows attackers to inject arbitrary URLs and make GET requests on behalf of the server. \n\n\n## Recommendation\n\nUpgrade to version 1.9.3 or later.",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@uppy/companion"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.9.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-8135"
  }, {
    "type" : "WEB",
    "url" : "https://hackerone.com/reports/786956"
  }, {
    "type" : "WEB",
    "url" : "https://www.npmjs.com/advisories/1501"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-918" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-08-31T19:01:35Z",
    "nvd_published_at" : null
  }
}