CVE-2020-15135: Save server CSRF Vulnerability Vulnerability

MODERATE
Advisory Identifier: GHSA-wwrj-35w6-77ff
CVSS 6.7
CWE-352
Published
Advisory Summary

CVE-2020-15135 is a MODERATE (CVSS 6.7) csrf vulnerability vulnerability (CWE-352: Cross-Site Request Forgery (CSRF)) affecting Save server libraries in the npm ecosystem. The issue involves csrf vulnerability in save-server. Remediation is available by upgrading affected packages to version 1.0.7.

CVE-2020-15135 at a Glance

CVE Identifier CVE-2020-15135
GHSA Identifier GHSA-wwrj-35w6-77ff
Severity MODERATE
CVSS v3.1 Base Score 6.7
CWE Classification CWE-352: Cross-Site Request Forgery (CSRF)
Affected Product Save server
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 6.7

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

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

How to Fix CVE-2020-15135

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

save-server fixed: 1.0.7
npm install save-server@1.0.7
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 save-server

How to Check if You Are Affected

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

npm ls save-server

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

Note: The npm ls save-server 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-352: Cross-Site Request Forgery (CSRF), where the web application does not, or cannot, sufficiently verify whether a request was intentionally provided by the user who sent the request, which could have originated from an unauthorized actor. In Save server, 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 Versions prior to version v1.05 are affected by a CSRF vulnerability, as there is no CSRF mitigation (Tokens etc.). The fix introduced in version v1.05 unintentionally breaks uploading so version v1.0.7 is the fixed version. This is patched by implementing [Double submit](https://medium.com/cross-site-request-forgery-csrf/double-submit-cookie-pattern-65bb71d80d9f). The CSRF attack would require you to navigate to a malicious site while you have an active session with Save-Server (Session key stored in cookies). The malicious user would then be able to perform some actions, including: - Upload file - Delete file - Add redirect #### If you are logged in as root, this attack is significantly more severe. They can (in addition to the above): - Create users - Delete users - Update users (change password) If they updated the password of a user, that user's files would then be available. If the root password is updated, all files would be visible if they logged in with the new password. Note that due to the same origin policy malicious actors cannot view the gallery or the response of any of the methods, nor be sure they succeeded. ### Patches This issue has been patched. Update to version v1.0.7 or above to benefit from this fix. ### Workarounds None. You should upgrade. ### References What is CSRF: https://owasp.org/www-community/attacks/csrf Fix type: https://medium.com/cross-site-request-forgery-csrf/double-submit-cookie-pattern-65bb71d80d9f ### For more information If you have any questions or comments about this advisory: * Open an issue in [Save-server](https://github.com/Neztore/save-server/) * Email us at [hi@nezto.re](mailto:hi@nezto.re) * Join our discord (preferred): [Invite](https://discord.gg/QevWabU)

CVE-2020-15135 Affected Save server Versions

1 component(s)
Fixed Versions:
1.0.7
Product / Package Ecosystem Affected Versions Fixed Version
save-server
npm
< 1.0.7
1.0.7

References

Frequently Asked Questions

What is CVE-2020-15135?
CVE-2020-15135 is a security vulnerability in Save server involving CSRF vulnerability in save-server under CWE-352: Cross-Site Request Forgery (CSRF).
Which Save server versions are affected?
Affected versions include releases prior to 1.0.7 across affected packages: save-server.
What version fixes CVE-2020-15135?
Upgrading to 1.0.7 (or the latest patched release for your respective branch) resolves the vulnerability.
Is save-server affected?
Yes, save-server is affected in releases prior to 1.0.7. Upgrade your dependency to 1.0.7 or later.
What is the CVSS score of CVE-2020-15135?
CVE-2020-15135 has a CVSS v3.1 base score of 6.7 (MODERATE) with vector string CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:L.
What CWE is associated with CVE-2020-15135?
CVE-2020-15135 is classified under CWE-352: Cross-Site Request Forgery (CSRF) (The web application does not, or cannot, sufficiently verify whether a request was intentionally provided by the user who sent the request, which could have originated from an unauthorized actor.).
How can I check npm dependencies for CVE-2020-15135?
Run the dependency tree command: 'npm ls save-server'. 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-wwrj-35w6-77ff",
  "modified" : "2021-01-07T23:42:18Z",
  "published" : "2020-08-04T14:54:08Z",
  "aliases" : [ "CVE-2020-15135" ],
  "summary" : "CSRF vulnerability in save-server",
  "details" : "### Impact\nVersions prior to version v1.05 are affected by a CSRF vulnerability, as there is no CSRF mitigation (Tokens etc.). The fix introduced in version v1.05 unintentionally breaks uploading so version v1.0.7 is the fixed version.\n\nThis is patched by implementing [Double submit](https://medium.com/cross-site-request-forgery-csrf/double-submit-cookie-pattern-65bb71d80d9f).\n\nThe CSRF attack would require you to navigate to a malicious site while you have an active session with Save-Server (Session key stored in cookies). The malicious user would then be able to perform some actions, including:\n- Upload file\n- Delete file\n- Add redirect\n\n\n#### If you are logged in as root, this attack is significantly more severe. They can (in addition to the above):\n- Create users\n- Delete users\n- Update users (change password)\n\nIf they updated the password of a user, that user's files would then be available. If the root password is updated, all files would be visible if they logged in with the new password.\n\nNote that due to the same origin policy malicious actors cannot view the gallery or the response of any of the methods, nor be sure they succeeded. \n### Patches\nThis issue has been patched. Update to version v1.0.7 or above to benefit from this fix.\n\n### Workarounds\nNone. You should upgrade.\n\n### References\nWhat is CSRF: https://owasp.org/www-community/attacks/csrf\nFix type: https://medium.com/cross-site-request-forgery-csrf/double-submit-cookie-pattern-65bb71d80d9f\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [Save-server](https://github.com/Neztore/save-server/)\n* Email us at [hi@nezto.re](mailto:hi@nezto.re)\n* Join our discord (preferred): [Invite](https://discord.gg/QevWabU) ",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "save-server"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.0.7"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "< 1.0.5"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/Neztore/save-server/security/advisories/GHSA-wwrj-35w6-77ff"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-15135"
  }, {
    "type" : "WEB",
    "url" : "https://medium.com/cross-site-request-forgery-csrf/double-submit-cookie-pattern-65bb71d80d9f"
  }, {
    "type" : "WEB",
    "url" : "https://www.npmjs.com/package/save-server"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-352" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-08-04T14:53:13Z",
    "nvd_published_at" : null
  }
}