CVE-2020-5237: Oneup/uploader bundle Path Traversal Vulnerability

HIGH
Advisory Identifier: GHSA-x8wj-6m73-gfqp
CVSS 8.8
CWE-23 CWE-22
Published
Advisory Summary

CVE-2020-5237 is a HIGH (CVSS 8.8) path traversal vulnerability (CWE-23: Relative Path Traversal) affecting Oneup/uploader bundle libraries in the Packagist ecosystem. The issue involves relative path traversal (cwe-23) in chunked uploads in oneup/uploader-bundle. Remediation is available by upgrading affected packages to version 2.1.5, 1.9.3.

CVE-2020-5237 at a Glance

CVE Identifier CVE-2020-5237
GHSA Identifier GHSA-x8wj-6m73-gfqp
Severity HIGH
CVSS v3.1 Base Score 8.8
CWE Classification CWE-23: Relative Path Traversal
Affected Product Oneup/uploader bundle
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 8.8

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2020-5237

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

oneup/uploader-bundle fixed: 2.1.5
Upgrade oneup/uploader-bundle to 2.1.5
oneup/uploader-bundle fixed: 1.9.3
Upgrade oneup/uploader-bundle to 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:

inspect dependencies for oneup/uploader-bundle

How to Check if You Are Affected

To determine whether your application is affected by CVE-2020-5237, inspect your project dependencies for Oneup/uploader bundle:

inspect dependencies for oneup/uploader-bundle

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

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-23: Relative Path Traversal, where the product uses external input to construct a pathname that should be within a restricted directory, but it does not properly neutralize sequences such as ".." that can resolve to a location that is outside of that directory. In Oneup/uploader bundle, 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

### Impact The vulnerability was identified in the web service for a chunked file upload. While the names of the POST parameters vary with the used frontend, their values are always used in the same way to build a path where the chunks are stored and assembled temporarily. By not validating these parameters properly, OneupUploaderBundle is susceptible to a path traversal vulnerability which can be exploited to upload files to arbitrary folders on the filesystem. The assembly process can further be misused with some restrictions to delete and copy files to other locations. The vulnerability can be exploited by any users that have legitimate access to the upload functionality and can lead to arbitrary code execution, denial of service and disclosure of confidential information. ### Patches Yes, see version 1.9.3 and 2.1.5. ### References https://owasp.org/www-community/attacks/Path_Traversal ### Credits: This security vulnerability was found by Thibaud Kehler of SySS GmbH. E-Mail: thibaud.kehler@syss.de

CVE-2020-5237 Affected Oneup/uploader bundle Versions

2 component(s)
Fixed Versions:
2.1.51.9.3
Product / Package Ecosystem Affected Versions Fixed Version
oneup/uploader-bundle
Packagist
≥ 2.0.0
< 2.1.5
2.1.5
oneup/uploader-bundle
Packagist
≥ 1.0.0
< 1.9.3
1.9.3

References

Frequently Asked Questions

What is CVE-2020-5237?
CVE-2020-5237 is a security vulnerability in Oneup/uploader bundle involving Relative Path Traversal (CWE-23) in chunked uploads in oneup/uploader-bundle under CWE-23: Relative Path Traversal.
Which Oneup/uploader bundle versions are affected?
Affected versions include releases prior to 2.1.5, 1.9.3 across affected packages: oneup/uploader-bundle.
What version fixes CVE-2020-5237?
Upgrading to 2.1.5, 1.9.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is oneup/uploader-bundle affected?
Yes, oneup/uploader-bundle is affected in releases prior to 2.1.5, 1.9.3. Upgrade your dependency to 2.1.5, 1.9.3 or later.
What is the CVSS score of CVE-2020-5237?
CVE-2020-5237 has a CVSS v3.1 base score of 8.8 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2020-5237?
CVE-2020-5237 is classified under CWE-23: Relative Path Traversal (The product uses external input to construct a pathname that should be within a restricted directory, but it does not properly neutralize sequences such as ".." that can resolve to a location that is outside of that directory.).
How can I check Packagist dependencies for CVE-2020-5237?
Run the dependency tree command: 'inspect dependencies for oneup/uploader-bundle'. 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-x8wj-6m73-gfqp",
  "modified" : "2021-01-08T20:30:34Z",
  "published" : "2020-02-18T18:59:24Z",
  "aliases" : [ "CVE-2020-5237" ],
  "summary" : "Relative Path Traversal (CWE-23) in chunked uploads in oneup/uploader-bundle",
  "details" : "### Impact\nThe vulnerability was identified in the web service for a chunked file\nupload. While the names of the POST parameters vary with the used\nfrontend, their values are always used in the same way to build a path\nwhere the chunks are stored and assembled temporarily. By not validating\nthese parameters properly, OneupUploaderBundle is susceptible to a path\ntraversal vulnerability which can be exploited to upload files to\narbitrary folders on the filesystem. The assembly process can further be\nmisused with some restrictions to delete and copy files to other\nlocations.\n\nThe vulnerability can be exploited by any users that have legitimate\naccess to the upload functionality and can lead to arbitrary code\nexecution, denial of service and disclosure of confidential information.\n\n### Patches\nYes, see version 1.9.3 and 2.1.5.\n\n### References\nhttps://owasp.org/www-community/attacks/Path_Traversal\n\n### Credits:\nThis security vulnerability was found by Thibaud Kehler of SySS GmbH.\nE-Mail: thibaud.kehler@syss.de",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "oneup/uploader-bundle"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.0.0"
      }, {
        "fixed" : "2.1.5"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "oneup/uploader-bundle"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.0.0"
      }, {
        "fixed" : "1.9.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/1up-lab/OneupUploaderBundle/security/advisories/GHSA-x8wj-6m73-gfqp"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-5237"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/1up-lab/OneupUploaderBundle/commit/a6011449b716f163fe1ae323053077e59212350c"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/oneup/uploader-bundle/CVE-2020-5237.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://www.syss.de/fileadmin/dokumente/Publikationen/Advisories/SYSS-2020-003.txt"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-22", "CWE-23" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-02-05T13:52:02Z",
    "nvd_published_at" : "2020-02-05T14:15:00Z"
  }
}