@vendure/core's insecure currencyCode handling allows wrong payment amounts
Impact
Currently, in many Vendure deployments it's possible to select any currencyCode (really any, doesn't need to be assigned to the channel) and pay through Mollie and Stripe in that particular currencyCode. The prices are not transformed. The result is the Order is in Payment Settled in the foreign currency. See SS, CZK is not in the channel. I've tested with Mollie and Stripe it both works.
Further notes
After looking into this further and with help from the comments below, the root cause of this vulnerability is the ability to specify an arbitrary currencyCode as a query parameter to an API call, and then Vendure will use this and pass it to the rest of the system as RequestContext.currencyCode.
The solution is to add validation to the passed currencyCode to ensure that it matches one of the available availableCurrencyCodes of the active Channel.
Furthermore, an additional check has been added for when the currencyCode changes during the AddingItems stage - in this case we need to re-calculate the prices in the new currency.
Patches
v2.1.3
Workarounds
You can define a custom OrderProcess onTransitionStart function which can verify the order's currencyCode is as expected before allowing the transition to the ArrangingPayment state.
Czego dotyczy
Kliknij technologię, aby zobaczyć wszystkie dotyczące jej podatności.
| Platforma | Paczka | Podatne wersje | Poprawka w wersji |
|---|---|---|---|
| Paczka npm | @vendure/core | < 2.1.3 | 2.1.3 |
Odnośniki
- Wektor CVSS
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N- Słabość (CWE)
-- Platforma
- npm
- Paczka
@vendure/core- Ujawniono
- 17.11.2023
- Aktualizacja
- 11.10.2026 10:22
Źródła i licencje
OSV / GitHub Advisory Database - GHSA-wm63-7627-ch33 - CC BY 4.0
Historia podatności: @vendure/core
Wszystkie opisane podatności tej paczki (Paczka npm), od najnowszej. Widać, czy to jednorazowa wpadka, czy paczka, której trzeba pilnować.
- Wszystkich wpisów
- 7
- Pierwsza → ostatnia
- 07.2023 09.2026
- Bez poprawki
- 0
- Wykorzystywana w atakach
- 0
Rozkład istotności
- Krytyczna 2
- Wysoka 1
- Średnia 2
- Niska 2
Ujawnienia w latach
- 2023: 2
- 2024: 0
- 2025: 0
- 2026: 5
-
@vendure/core's insecure currencyCode handling allows wrong payment amounts ten wpis
Dowiedz się, które podatności dotyczą Twojej aplikacji
Po podłączeniu integracji DockRay i włączeniu raportowania oprogramowania DockRay porównuje zgłoszone wersje komponentów ze znanymi podatnościami i powiadamia o potwierdzonych dopasowaniach. Zakres zależy od obsługiwanej technologii i dostępnych biuletynów.