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
6.5
/ 10

CVSS base metrics

Attack vector
Network
Attack complexity
High
Privileges required
None
User interaction
None
Scope
Changed
Confidentiality
Low
Integrity
Low
Availability
Low
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:L/A:L

CVE ID

CVE-2022-23609