Ecommerce Template 決済で価格を改ざんされ別商品を安く購入される
Summary
Ecommerce Template のカート・決済処理に、認証済みの利用者が商品の価格を操作できる問題が見つかりました。注文した商品とは別商品の価格で決済され、最も安い商品の価格で何度でも注文できるおそれがあります。修正版はコミット e6b364cd668f2ba875cfa7f6d55c63e771715df7 で提供されています。該当する版を利用している場合は、この修正を適用してください。
AI summary
Produced by SecPulse using an external AI model; it may contain mistakes. Check the original description and references below before acting on it.
Ecommerce Template のカート・決済処理に、認証済みの利用者が商品の価格を操作できる問題が見つかりました。注文した商品とは別商品の価格で決済され、最も安い商品の価格で何度でも注文できるおそれがあります。修正版はコミット e6b364cd668f2ba875cfa7f6d55c63e771715df7 で提供されています。該当する版を利用している場合は、この修正を適用してください。
Affected packages
| Package | Affected → Fixed | |
|---|---|---|
| MarcosCamara01Ecommerce Template |
≥ 2aa8ec539b6b441632096ced78e099fb096a57da, < e6b364cd668f2ba875cfa7f6d55c63e771715df7→ e6b364cd668f2ba875cfa7f6d55c63e771715df7 |
e6b364cd668f2ba875cfa7f6d55c63e771715df7 |
Original description The description as published by the source.
External Control of Assumed-Immutable Web Parameter (CWE-472) in the cart and checkout flow of MarcosCamara01 Ecommerce Template allows an authenticated user with no special privileges to be charged the price of one product while placing an order for another, because POST /api/user/cart accepts variantId, which determines what the order records, and stripeId, which determines what Stripe charges, as two independent fields of the request body, stores both on the cart row, and no check requires the stripeId to be the one that belongs to the variantId. POST /api/stripe/payment builds the Stripe Checkout line items from the stored value, as { price: item.stripeId, quantity }, so the amount charged is the amount of that Stripe price. The checkout.session.completed webhook then creates the order products from the variantId of the same cart row, so the order records a product that was not paid for. Every stripeId in the catalogue is readable by any visitor, so no value has to be guessed. This results in orders for goods at the price of the cheapest item in the catalogue, repeatable without limit, and in order records whose amount does not correspond to the product they list.
Source: CVE.org (CVE Program・cvelistV5) NVD GitHub Advisory
References
- advisory secur0.com
- advisory nvd.nist.gov
- advisory github.com
- package github.com
- patch github.com
- web github.com