CVE-2026-115453: Cross user deletion and modification of cart and wishlist rows in Ecommerce Template through unscoped primary key queries

Published Oct 22, 2026
·
Updated

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.currentuserid() with userid, 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 DATABASEURL 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. cartitems.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.

Affected Software

1 affected component
MarcosCamara01 Ecommerce Template

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Patch adf7dedbb41894c0bad0b33a26999b0da7e967b7
  2. Configuration

    Enable row-level security and create policies comparing app.current_user_id() with user_id, then ALTER TABLE the affected tables to FORCE ROW LEVEL SECURITY so policies also apply to the table-owning role.

    PostgreSQL row-level security for cart and wishlist tables Row-level security policies and FORCE ROW LEVEL SECURITY = enabled; policies compare app.current_user_id() with user_id; FORCE ROW LEVEL SECURITY enabled

Event History

Oct 22, 2026
CVE Published
via MITRE·03:22 PM
Data Sourced
via MITRE·03:22 PM
RemedyDescriptionWeakness

Frequently Asked Questions

1

Which deployments are exposed?

Deployments are exposed when the application uses the same DATABASE_URL used for migrations and therefore connects as the role that owns the tables. PostgreSQL row-level security policies do not apply to a table-owning role unless row-level security is forced.

2

What does an attacker need to exploit this?

The attacker needs to be an authenticated user and needs target cart or wishlist row identifiers. The affected identifiers are sequential bigserial values, so identifiers belonging to other users can be enumerated.

3

How can I determine whether row-level security protects this deployment?

Check whether the runtime database role owns the cart and wishlist tables, and whether those tables have been configured with FORCE ROW LEVEL SECURITY. Merely enabling row-level security and creating policies is insufficient when the application connects as the table owner.

4

Which operations lack ownership scoping?

The affected operations are cartRepository.delete(), cartRepository.updateQuantityInternal(), and wishlistRepository.delete(). They match rows by primary key without a predicate restricting the row to the authenticated user.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203