Skip to content

Path Traversal in FRI Server /download Endpoint #262

@GaneshPatil7517

Description

@GaneshPatil7517

@pradeeban
File: fri/server/main.py

The download_file parameter is not sanitized:

download_file = request.args.get('fetch')
return send_from_directory(directory_name, download_file, as_attachment=True)

A request like /download/test?fetchDir=src&fetch=../../../etc/passwd can read any file on the server.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions