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)
Summary
The
generate_video()toolfirst_frame_imageparameter accepts local file paths without validation, reading arbitrary files and sending them (base64-encoded) to the MiniMax API.Details
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)