MediumGHSA-wjmg-4cq5-m8hg
Sylius is Missing Authorization in API v2 Add Item Endpoint
Affected versions
2.0.0 to before 2.0.16, 2.1.0 to before 2.1.12, 2.2.0 to before 2.2.3 - fixed in 2.0.16Details
### Impact The `POST /api/v2/shop/orders/{tokenValue}/items` endpoint does not verify cart ownership. An unauthenticated attacker can add items to other registered customers' carts by knowing the cart `tokenValue`. ``` POST /api/v2/shop/orders/{tokenValue}/items ``` Other mutation endpoints (PUT, PATCH, DELETE) are **not affected**. API Platform loads the Order entity through the state provider for these operations, which triggers `VisitorBasedExtension` and returns 404 for unauthorized users. An attacker who obtains a cart `tokenValue` can add arbitrary items to another customer's cart. Th
Is your site exposed?Run a free passive scan. See your platform, versions and the issues on your surface in under a minute.
Check if my site is affected