Skip to content

CSRF vulnerability in save-server

Moderate severity GitHub Reviewed Published Aug 2, 2020 in Neztore/save-server • Updated Jan 9, 2023

Package

npm save-server (npm)

Affected versions

< 1.0.5

Patched versions

1.0.7

Description

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.

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:

References

@Neztore Neztore published to Neztore/save-server Aug 2, 2020
Reviewed Aug 4, 2020
Published to the GitHub Advisory Database Aug 4, 2020
Last updated Jan 9, 2023

Severity

Moderate

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
High
Privileges required
Low
User interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
Low

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:L

EPSS score

0.413%
(75th percentile)

Weaknesses

CVE ID

CVE-2020-15135

GHSA ID

GHSA-wwrj-35w6-77ff

Source code

No known source code
Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.