Skip to content

bug: Path traversal in /modeling file upload via unsanitized UploadFile.filename #87

@yomo40

Description

@yomo40

while saving uploaded files, /modeling directly uses os.path.join(work_dir, file.filename) to write to disk without performing basename extraction, path normalization, or rejecting ../ from file.filename.

Caution

Attackers can trigger directory traversal by crafting filenames, allowing them to write files outside the task directory and overwrite other files within the project or the contents of mounted directories on the host machine. This is especially dangerous in Docker development mode because backend:/app is mounted into the container.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions