SQL Injection in Product Details
An unauthenticated attacker can inject SQL via a session variable used in an ORDER BY clause, allowing insertion of a new admin user. With backend access, a PHP object injection in the CSV import leads to remote code execution.
blog.ripstech.com
Published on blog.ripstech.com
OXID eShop is an e-commerce shop software originating from Germany and its enterprise edition is used by industry leaders such as Mercedes, BitBurger and Edeka. In this technical blog post we will show you how an unauthenticated attacker gains Remote Code Execution in OXID eShop running the latest version 6.3.4 on…
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 user input stored in a session variable is concatenated into an SQL ORDER BY clause without sanitisation, and later a CSV import unserialises user-supplied data without validation.
Impact
An unauthenticated attacker could gain remote code execution and full control of the shop.
What the attacker needed
No authentication needed; default shop configuration
The fix
The vendor fixed the issue on 30 July 2019; users should update to the latest version.
How it was found
- Send a request with a crafted 'sorting' parameter to store malicious SQL in the session.
- View a product to trigger the SQL query with the injected ORDER BY clause.
- Use stacked queries to insert a new admin user with a chosen password.
- Log into the backend with the new admin account.
- Upload a CSV file containing a malicious serialised payload in the OXPERSPARAM column to trigger PHP object injection and achieve remote 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.
The shop software builds a database query using a value that an attacker can control through their session, letting them run their own database commands. They use this to create an admin account, then abuse a file import feature that unsafely processes serialised data to run code on the server.
What is SQL injection?
Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.