CVE-2018-13784: PrestaShop 1.6.x Privilege Escalation
PrestaShop 1.6.x stores session data in a cookie encrypted with either Blowfish/ECB or AES/CBC, but the integrity check uses CRC32 and the encryption lacks authentication. An attacker can read and write session values, leading to customer session hijacking, partial admin access, and potentially full admin access and code execution.
Published on ambionics.io
Instead of using the usual PHP session ID and storing data locally, PrestaShop stores session data in a cookie. For the cookie not to get altered, a checksum is appended, and the whole thing is then ciphered.
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 cookie used CRC32 for integrity and ECB or CBC encryption without authentication, allowing padding oracle and block manipulation attacks.
Impact
An attacker could hijack customer or employee sessions, steal business data, gain partial or full admin access, and potentially achieve code execution.
What the attacker needed
PrestaShop [redacted] or below; Attacker can send crafted cookies; Employee shares password with customer account (for full…
The fix
The bug was fixed in PrestaShop versions [redacted] and [redacted] by improving cookie encryption.
How it was found
- Obtain a valid session cookie by logging in as a customer.
- Modify the cookie to spoof the id_employee value using CRC collision and block splicing.
- Use the modified cookie to access the admin panel partially.
- Read the checksum by exploiting the deserialization oversight and bruteforcing digits.
- Use the read checksum to read the hashed password from the cookie.
- Use the hashed password as a CSRF token or to recover cart tokens for full access.
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.
PrestaShop kept your login session inside a cookie, a small file your browser sends back. The cookie was scrambled (encrypted) but not properly protected against tampering, so an attacker could change parts of it or read secret parts. This let them pretend to be other users, including administrators.
What is Crypto?
Encryption, signatures, randomness or certificate checks that do not protect what they claim to.