Article
You signed in. Why are you seeing someone else’s basket?
By Gustavo Costa•11/18/2026

You sign in to check your shopping basket. It contains apple juice and cereal. You only added coffee.
Imagine the same thing at a pickup counter. The clerk checks your name, finds a bag by its label, and hands it over. They forgot to check whether the bag was yours.
Signing in answers one question
Signing in creates a session so the server can recognize your account as you browse. That’s authentication.
When you open a basket, the server needs another check: may this account view this basket? That’s authorization.
The basket number tells the store which purchase to find
In the fictional OWASP Juice Shop, the basket number, or ID, appears in the address the browser uses to request its contents. Like the label on a bag, it tells the server which basket to find.
The flaw appears when the request refers to another account’s basket. The server recognizes the signed-in account, finds the requested basket, and returns its contents without checking whether that account may view it.
| Information | Question it answers |
|---|---|
| Signed-in session | Who is asking? |
| Basket ID in the request address | Which basket are they asking for? |
| Access rule | May that account view this basket? |
The ID is visible in the request. The security flaw is the missing permission check in the last row. Even a basket with a hard-to-guess ID needs that check.
This is called IDOR. It falls under broken access control, the first category of the 2025 OWASP Top 10. OWASP — IDOR · OWASP Top 10:2025

What if it were an invoice?
The lab shows someone else’s groceries. On a real “My invoices” page, the same error could reveal a name and address. On a “My files” page, it could expose a private document.
Changes require permission too. If the store allows a person to remove an item, the server needs to check that the account may edit that basket before saving the change.
How I’d check before shipping
In a test environment, I’d create two fictional accounts, Ana and Bruno. I’d put coffee in Ana’s basket and juice in Bruno’s.
- When Ana opens her basket, she sees the coffee.
- When Bruno opens his basket, he sees the juice.
- When the server receives a request from Ana’s session for Bruno’s basket, it refuses and keeps the contents private.
If the feature supports editing, I’d repeat the check for that action and verify that a rejected request leaves the basket intact.
Think about the last page you shipped called “My basket,” “My invoices,” or “My files.” Where does the server check the “my”?
AI-generated editorial illustrations created for this article.


