Katalog CVE

CVE-2026-115453

WysokieCVSS 7.1
Opublikowano: Zaktualizowano: Przetłumaczono: NVD NIST

Streszczenie

W repozytoriach koszyka i listy życzeń szablonu MarcosCamara01 Ecommerce Template występuje obejście autoryzacji przez klucz kontrolowany przez użytkownika (CWE-639). Metody cartRepository.delete(), cartRepository.updateQuantityInternal() i wishlistRepository.delete() dopasowują wiersze wyłącznie po kluczu głównym, bez warunku właściciela, a autoryzacja opiera się na zabezpieczeniach wierszy PostgreSQL. Migracje włączają RLS i tworzą polityki, ale nie stosują FORCE ROW LEVEL SECURITY, a PostgreSQL nie stosuje polityk do roli będącej właścicielem tabeli; aplikacja łączy się jako właściciel, więc polityki jej nie dotyczą. Identyfikatory są sekwencyjne, więc można je wyliczyć, co pozwala dowolnemu uwierzytelnionemu użytkownikowi usuwać i modyfikować koszyki i listy życzeń innych użytkowników.

Ocena ryzyka

Każdy uwierzytelniony użytkownik może niszczyć i modyfikować zawartość koszyków i list życzeń innych kont. Podważa to integralność danych i zaufanie do platformy e-commerce.

Rekomendacja

Zastosuj FORCE ROW LEVEL SECURITY lub używaj oddzielnej roli bazy danych bez uprawnień właściciela dla aplikacji. Dodaj jawne warunki właściciela w zapytaniach repozytoriów.

Inne podatności w MarcosCamara01 Ecommerce Template

Zobacz wszystkie
Oryginalny opis (angielski, źródło NVD)

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.

Dane podatności pochodzą z NVD (NIST) · CISA KEV · EPSS