VDB
KO
HIGH 7.5

GHSA-5j8p-5rrj-8wjg

xiaomusic contains an unauthenticated path traversal vulnerability

Details

xiaomusic v0.5.7 contains an unauthenticated path traversal vulnerability in the GET /music/{file_path:path} endpoint that allows unauthenticated attackers to read arbitrary files outside the intended music directory by exploiting an incomplete path prefix check. Attackers can request files from sibling directories whose names share the music_path prefix by crafting traversal sequences, bypassing the path restriction due to the missing trailing separator in the comparison logic to retrieve arbitrary files from the server.

Are you affected?

Enter the version of the package you're using.

Affected packages

PyPI / xiaomusic
Introduced in: 0 Fixed in: 0.5.8
Fix pip install --upgrade 'xiaomusic>=0.5.8'

References