Blog Title: Not Your File: How Misconfigured MIME Types Let Me Upload Evil Scripts
文章描述了一个通过文件上传接口绕过安全验证的案例,展示了未正确验证MIME类型和文件内容可能导致远程代码执行(RCE)的风险,强调了在安全开发中严格验证文件类型的重要性。 2025-5-15 05:1:29 Author: infosecwriteups.com(查看原文) 阅读量:11 收藏

Iski

Free Link 🎈

Hey there!😁

Image by Gemini AI

Life’s Rule #1: Never trust someone who says, “Just upload your resume here.” Because I did. And ended up getting RCE.

Rule #2: If your file upload accepts .svg, it’s probably open to the gates of hell.

Rule #3: Always double-check your MIME types, unless you enjoy turning profile pictures into payloads.

While sipping chai and passively scrolling through JS files like it’s my toxic ex’s Instagram, I stumbled upon an interesting endpoint:

POST /user/upload/avatar

It looked boring. Typical profile image upload, accepting JPEGs, PNGs, blah blah. But here’s the kicker — it didn’t validate MIME types server-side. Not even a peep of sanitization.

So I thought: “Can I fake it ’til I make it?”

Answer: Yes. Yes, I can. And I did. 😈


文章来源: https://infosecwriteups.com/blog-title-not-your-file-how-misconfigured-mime-types-let-me-upload-evil-scripts-889efb18a7ce?source=rss----7b722bfd1b8d--bug_bounty
如有侵权请联系:admin#unsafe.sh