Pimcore contains Unrestricted Upload of File with Dangerous Type
The user profile upload feature did not properly validate file content-type, allowing an authenticated user to bypass the check by adding a valid signature (e.g., GIF89) and sending an invalid content-type. This could let an attacker upload HTML files with JavaScript that execute in the context of the domain.
pimcore/pimcore
Originally disclosed on huntr
Impact
The upload functionality for updating user profile does not properly validate the file content-type, allowing any authenticated user to bypass this security check by adding a valid signature (p.e. GIF89) and sending any invalid content-type. This could allow an authenticated attacker to upload HTML files with JS content that will be executed in the context of the domain.
Patches
Update to version 10.5.16 or apply this patch manually https://github.com/pimcore/pimcore/pull/14125.patch
From the GitHub Advisory Database (GHSA-8xv4-jj4h-qww6, CC BY 4.0).
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the file upload validation relied on a simple signature check rather than properly verifying the file's actual content type and restricting dangerous extensions.
Impact
An authenticated attacker could upload HTML files containing JavaScript that would execute in the context of the domain, potentially leading to cross-site scripting or other client-side attacks.
What the attacker needed
Authenticated user account
The fix
The issue was fixed in version 10.5.16, and a patch is available for manual application.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
When you upload a file, the website should check what kind of file it is. Here, the check could be fooled by putting a fake 'signature' at the start of the file, so the site thought it was an image when it was actually a web page with code. That code could then run in the browser of anyone who viewed the uploaded file, which is dangerous.
What is File upload?
An upload feature accepts a file that the server or other users' browsers then treat as code or as something trusted.