How I Found Multiple CVEs in InnoShop ≤0.4.1
InnoShop up to 0.4.1 had multiple IDOR flaws in the frontend shop allowing one customer to view another's order details, place orders using another's personal data, and delete another's review. The admin panel also allowed authenticated remote code execution via a PHP file upload and rename, and multiple path traversal issues in the file manager API enabled file read, write, delete, and directory creation.
medium.com
Published on medium.com
In today’s blog post, I’ll be covering three vulnerabilities that I recently discovered and disclosed, which affect all versions of InnoShop up to and including 0.4.1. These issues have been assigned the following CVE identifiers:
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 application lacked ownership checks on object identifiers in the frontend and lacked server-side validation of file extensions in the admin rename and file manager API functions.
Impact
An attacker could view other customers' PII, place orders using their details, delete their reviews, and, with admin access, achieve remote code execution and read, write, or delete arbitrary files on the server.
What the attacker needed
A free customer account; admin panel access for RCE and path traversal
The fix
InnoShop v0.5.0 was released claiming to fix these issues, but the author has not tested whether the fixes are solid.
How it was found
- Register two customer accounts and place an order as the first customer.
- As the second customer, browse to the first customer's order URL to view their order details.
- Intercept the order confirmation request and change the customer ID to the other user's ID to place an order with their details.
- As the second customer, send a DELETE request for a review and change the review ID to delete the first customer's review.
- In the admin panel, upload a JPEG image and intercept the upload request to inject PHP code into the file.
- Use the rename function and intercept the request to change the file extension to .php, then browse to the file to trigger code execution.
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.
An IDOR (Insecure Direct Object Reference) happens when a website uses a simple identifier like a number in the URL to refer to your data, but does not check that you are allowed to see that data. Here, changing the number in the order URL let one customer see another customer's order details. Separately, the admin file manager let an authenticated admin rename an uploaded image to a .php file, and because PHP executes code in such files, that gave command execution on the server.
What is IDOR?
One user can read or change another user's data, usually by changing an identifier the server trusts without checking who is asking. One of the most paid bug classes on web programs.