The vulnerability is a classic path traversal flaw located in the REST API of the short-video-maker application. The root cause lies within the APIRouter.setupRoutes method in src/server/routers/rest.ts. This method defines two Express.js route handlers for the endpoints /api/tmp/:tmpFile and /api/music/:fileName.
Both handlers accept a parameter from the URL (tmpFile and fileName, respectively) and directly use it to construct a file path on the server's filesystem using path.join. The critical flaw is the lack of input sanitization or path normalization. The application does not validate whether the resolved path is within the intended base directories (tempDirPath and musicDirPath).
As a result, an attacker can send a crafted HTTP request containing path traversal sequences (e.g., ..%2f which decodes to ../) to navigate the file system and access sensitive files readable by the server process, such as /etc/passwd. The vulnerable code then reads the file using fs.createReadStream and streams its content back to the attacker. Since the vulnerability is in unpatched, publicly known code, any instance of short-video-maker version 1.3.4 or older is susceptible to this remote attack.