The vulnerability allows stored Cross-Site Scripting (XSS) by bypassing file upload filters in Parse Server. The core of the issue lies in how the server processes the Content-Type header during file uploads. The advisory points out two related problems: a filter bypass using MIME parameters and an incomplete blocklist of dangerous file extensions.
The analysis of the provided patches, specifically commits 4f53ab3cad5502a51a509d53f999e00ff7217b8d and c7599c577a02b97eb5e76d4e20517b0283ae73c8, reveals that the main logic flaw is located in the handleCreateFile method within the FilesRouter class in src/Routers/FilesRouter.js.
The vulnerable code failed to strip MIME parameters from the Content-Type string before validating the file extension. For example, a Content-Type of application/xml;charset=utf-8 would result in the extension being incorrectly identified as xml;charset=utf-8, which would not be found in the blocklist of dangerous extensions. The patch corrects this by splitting the content type string at the semicolon, ensuring that the correct extension (xml in this case) is extracted and validated.
Therefore, the FilesRouter.handleCreateFile function is the direct location of the vulnerability. When this vulnerability is exploited, this function would be processing the malformed Content-Type header and would appear in any runtime profile or stack trace. The patches also update the default blocklist in configuration files (src/Options/Definitions.js), but the exploitable processing logic is contained within handleCreateFile.