Skip to content

Command Injection in FRI Server /contribute Endpoint #261

@GaneshPatil7517

Description

@GaneshPatil7517

@pradeeban
File: fri/server/main.py
Severity: CRITICAL

The /contribute endpoint passes user-supplied JSON directly to subprocess.check_output() with shell=True:

proc = check_output(["contribute", STUDY_NAME, BRANCH_NAME, PR_BODY], 
                     cwd=concore_path, shell=True)

An attacker can send {"branch": "main & rm -rf /"} to execute arbitrary system commands on the server. The /library endpoint has the same vulnerability.

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