Skip to content

[Security] Arbitrary file read via generate_video first_frame_image parameter #99

Description

@Correctover

Summary

The generate_video() tool first_frame_image parameter accepts local file paths without validation, reading arbitrary files and sending them (base64-encoded) to the MiniMax API.

Details

if not first_frame_image.startswith(("http://", "https://", "data:")):
    with open(first_frame_image, "rb") as f:
        image_data = f.read()  # Read ANY file
        first_frame_image = f"data:image/jpeg;base64,{base64.b64encode(image_data).decode()}"

No file type, content, or path validation.

Impact

Arbitrary file read with exfiltration via API request payload.

Suggested Fix

Validate file extension (.jpg/.png only), check image magic bytes, enforce path confinement.

Reported by Correctover Security Research (https://correctover.com)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions