Skip to content
This repository has been archived by the owner on Dec 21, 2022. It is now read-only.

Uncontrolled Data Used in Path Expression using Path Traversal in server.py

Moderate
benjjvi published GHSA-cc8j-fr7v-7r6q Feb 3, 2022

Package

server.py (Server)

Affected versions

>private.debug.3.1.0

Patched versions

private.debug.3.1.1

Description

Impact

What kind of vulnerability is it? Who is impacted?
This vulnerability is a data vulnerability, as it allows somewhere within code for users to submit paths to have the deletion of any file. Any user running commit 3fa8bbf, 1bda8d1, 12a9590, 428b361, 34fb194, b521636, ef3583e, or f5efa6a are vulnerable.

Patches

Has the problem been patched? What versions should users upgrade to?
The problem has not been patched as of yet. A fix is expected in the next commit. As of commit 1eb1e54, the issue has been patched. Any downloads of iTunesRPC-Remastered source before this commit should download the latest source ASAP.

Workarounds

Is there a way for users to fix or remediate the vulnerability without upgrading?
Manual modification of source code can be efficient in remedying this issue. To fix this, you must:

  1. import secure_filename from werkzeug.utils
  2. Wrap line(s) 129 remove(filename) in secure_filename to change the line to remove(secure_filename(filename))

CWEs

CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
CWE-23: Relative Path Traversal
CWE-36: Absolute Path Traversal
CWE-73: External Control of File Name or Path
CWE-99: Improper Control of Resource Identifiers ('Resource Injection')

References

Learn more about Path Traversal via OWASP
CWE-22
CWE-23
CWE-36
CWE-73
CWE-99

For more information

If you have any questions or comments about this advisory:

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
None
User interaction
None
Scope
Changed
Confidentiality
Low
Integrity
Low
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:N/UI:N/S:C/C:L/I:L/A:L

CVE ID

CVE-2022-23609