The Story Behind 4 Vulnerabilities in a Single Target
The platform allowed SVG uploads for logos and profile pictures while only checking the file extension, so a malicious SVG could run script when viewed and expose cookies. It also let users exceed Free Plan product and user limits through a missing backend check and a race condition.
medium.com
Published on medium.com
I recently spent some time testing a target platform that offers e-commerce store management tools. The goal was simple: understand how the system works, explore its features, and see if anything breaks along the way.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the upload feature trusted the file extension instead of validating content, and the plan limits were enforced only in the browser or without atomic checks on the server.
Impact
An attacker could steal session cookies of users who view the malicious images, obtain premium features without paying, and create more users than the Free Plan allows.
What the attacker needed
Ability to upload files; victim views the uploaded image; a Free Plan account
The fix
The platform should validate uploaded file content rather than only the extension, enforce plan limits on the server with atomic checks, and use transactions or locking to prevent race conditions.
How it was found
- Go to the store settings page and upload an SVG file as the invoice logo or favicon.
- Open the uploaded image in a new tab and observe the script executing.
- Go to the account settings page and upload an SVG file as the profile picture.
- Open the uploaded profile picture in a new tab and observe the script executing.
- Reach the 25-product Free Plan limit, then visit the mockup page and add variations and publish again.
- Intercept the new user request, clone it with different details, and send the clones simultaneously.
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 write-up has not been written yet. The Original tab links to the source.
The site let people upload pictures, but it only looked at the file name ending and not what was inside the file. Someone could upload a picture file that actually contains a small program, and when another person opened that picture, the program would run in their browser. Separately, the site's paid plan limits could be bypassed by sending requests directly or many at once.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.