Parse Server is an open source backend that can be deployed to any infrastructure that can run Node.js. Prior to 8.6.73 and 9.7.1-alpha.4, a file can be uploaded with a filename extension that passes the file extension allowlist (e.g., .txt) but with a Content-Type header that differs from the extension (e.g., text/html). The Content-Type is passed to the storage adapter without consistency validation. Storage adapters that store and serve the provided Content-Type (such as S3 or GCS) serve the file with the mismatched Content-Type. The default GridFS adapter is not affected because it derives Content-Type from the filename at serving time. This vulnerability is fixed in 8.6.73 and 9.7.1-alpha.4.
Parse Server versions before 8.6.73 and 9.7.1-alpha.4 allow file uploads with mismatched Content-Type headers that bypass extension allowlists, enabling potential content-type confusion attacks. Storage adapters like S3 and GCS serve files with attacker-controlled Content-Types, potentially leading to XSS or other exploitation.
يسمح Parse Server بتحميل ملفات بامتدادات مسموحة (مثل .txt) لكن برؤوس Content-Type مختلفة (مثل text/html) دون التحقق من التطابق. محولات التخزين مثل Amazon S3 و Google Cloud Storage تخدم الملفات برؤوس Content-Type التي يتحكم بها المهاجم، مما قد يؤدي إلى هجمات XSS أو تنفيذ محتوى ضار.
خوادم Parse السابقة للإصدار 8.6.73 و 9.7.1-alpha.4 تسمح برفع ملفات بعناوين Content-Type غير متطابقة تتجاوز قوائم امتدادات الملفات المسموحة. محولات التخزين مثل S3 و GCS تخدم الملفات برؤوس Content-Type يتحكم بها المهاجم.
Upgrade Parse Server to version 8.6.73 or 9.7.1-alpha.4 or later. Implement strict Content-Type validation that ensures consistency between file extension and Content-Type header before passing to storage adapters. Configure storage adapters (S3, GCS) to enforce Content-Type restrictions and implement server-side Content-Type derivation from filenames.
قم بترقية Parse Server إلى الإصدار 8.6.73 أو 9.7.1-alpha.4 أو أحدث. طبق التحقق الصارم من نوع المحتوى للتأكد من التطابق بين امتداد الملف ورأس Content-Type قبل التمرير إلى محولات التخزين. قم بتكوين محولات التخزين لفرض قيود Content-Type وتطبيق اشتقاق نوع المحتوى من أسماء الملفات على جانب الخادم.