CVE-2024-22417: Flask Send File User Mimetype

A user-controlled value is used as the MIME type in `send_file`. If the content being sent is fetched from an attacker-controlled external source without validation, this can lead to XSS.

Provally CuratedPublic repositoryHighMedium confidenceVerifiedApache-2.0Python
greprules fetch cve-2024-22417-flask-send-file-user-mimetype --engine opengrep

Description

A user-controlled value is used as the MIME type in `send_file`. If the content being sent is fetched from an attacker-controlled external source without validation, this can lead to XSS.