matcha icon indicating copy to clipboard operation
matcha copied to clipboard

BUG: Unvalidated Content-Type in attachment handling

Open andrinoff opened this issue 7 months ago • 2 comments

Describe the bug Email attachments use Content-Type from headers (untrusted) without validation. Malicious MIME types could cause issues in viewers/handlers.

To reproduce fetcher/fetcher.go stores MIMEType directly from email headers without validation.

Expected behavior Validate MIME type against allowlist or sanitize to prevent injection of dangerous types.

Additional context

  • Good first issue
  • Low severity (matcha doesn't execute attachments)
  • But MIME type used for display/download decisions
  • Could be used for social engineering

Suggested fix: Validate MIME type format or use allowlist of safe types.

OS All platforms

andrinoff avatar Apr 21 '26 09:04 andrinoff

This has had no activity for 30 days. It will be closed in 14 days unless updated. Comment or remove the stale label to keep it open.

floatpanebot avatar May 22 '26 06:05 floatpanebot

Closing due to inactivity. Reopen if still relevant.

floatpanebot avatar Jun 04 '26 19:06 floatpanebot