---
id: "CVE-2026-115453"
kind: "vulnerability"
aliases: ["CVE-2026-115453"]
title: "MarcosCamara01 Ecommerce Template: users can alter other users' carts and wishlists"
severity: "high"
cvss: 7.1
epss: 0.00249
exploited: false
status: "open"
category: "other"
products: []
ecosystems: []
tags: ["drizzle", "ecommerce-template", "other", "postgresql", "self-hosted"]
not_affected_if: ["app-uses-non-owner-role", "forced-rls"]
published_at: "2026-10-22T16:17:35+00:00"
first_seen_at: "2026-10-23T21:57:31+00:00"
updated_at: "2026-10-25T03:31:40+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-115453", "first_seen_at": "2026-10-23T21:57:31+00:00"}, {"source": "epss", "url": "https://api.first.org/data/v1/epss?cve=CVE-2026-115453", "first_seen_at": "2026-10-24T07:15:51+00:00"}]
---

# MarcosCamara01 Ecommerce Template: users can alter other users' carts and wishlists

The MarcosCamara01 Ecommerce Template deletes and modifies cart and wishlist rows by primary key without checking the owning user. Any logged-in user can change or delete other accounts' cart and wishlist contents in the same installation.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Check whether the application connects to PostgreSQL as the table owner, since the template uses one `DATABASE_URL` for migrations and runtime.
- Run `SELECT relname, relrowsecurity, relforcerowsecurity FROM pg_class WHERE relname IN ('cart_items','wishlist');` and look for `relforcerowsecurity` = `false`.
- Look in `src/lib/db/drizzle/repositories/` for delete and update calls on `cart_items` and `wishlist` that have no `user_id` condition.

## Fix

- Upstream fixed version: unknown (the sources do not name one).
- Run the application under a PostgreSQL role that does not own the tables, so the existing row level security policies apply.
- Or add `ALTER TABLE ... FORCE ROW LEVEL SECURITY` to the migrations for `cart_items` and `wishlist`.
- Add a `user_id` predicate to the cart and wishlist delete and update queries.

## Timeline

- 2026-10-23T21:57:31+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-115453
- 2026-10-24T07:15:51+00:00 epss https://api.first.org/data/v1/epss?cve=CVE-2026-115453

## From the sources

Authorization Bypass Through User-Controlled Key (CWE-639) in the cart and wishlist repositories of MarcosCamara01 Ecommerce Template allows any authenticated user to delete and modify the cart and wishlist rows of any other user, because cartRepository.delete(), cartRepository.updateQuantityInternal() and wishlistRepository.delete() in src/lib/db/drizzle/repositories/ match rows by primary key alone, with no predicate on the owning user, and the per user authorization for those three operations rests on PostgreSQL row level security. The migrations run ALTER TABLE ... ENABLE ROW LEVEL SECURITY and create policies comparing app.current_user_id() with user_id, but never ALTER TABLE ... FORCE ROW LEVEL SECURITY, and PostgreSQL does not apply policies to the role that owns a table. The template uses one DATABASE_URL both to run the migrations, which create the tables, and for the application at runtime, so the application connects as the owner of the tables and the policies do not apply to it. cart_items.id and wishlist.id are sequential bigserial values, so the identifiers of rows belonging to other users can be enumerated, and the update path returns the modified row, which carries the identifier of the user it belongs to. This results in the destruction and modification of cart and wishlist contents belonging to other accounts of the installation.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
