Skip to content

security vulnerability caused by the file path suffix override #453

@maxdorninger

Description

@maxdorninger

The filePathSuffix value provided via SelectFilePathSuffixDialog is sent directly as override_file_path_suffix to /api/v1/tv/torrents, and on the backend this suffix is concatenated into episode filenames/paths without sanitization. An attacker with access to this dialog can supply values containing ../ or path separators so that, when imports run, files are written outside the intended show/season directory (path traversal / arbitrary file overwrite). Harden this by validating and normalizing override_file_path_suffix server-side (e.g. restrict to a safe character set and reject .. and path separators) and by treating it strictly as a filename suffix, not a partial path.

Originally posted by @Copilot in #331 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions