Loading advisory.
Loading advisory.
@vendure/core's insecure currencyCode handling allows wrong payment amounts
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.
Published 2023-11-17 21:50 UTC · Modified 2023-11-17 21:50 UTC
Severity and EPSS are shown separately. Helm does not combine them into one score. How tiers work
| Package | Ecosystem |
|---|
| Affected |
|---|
| Fixed in |
|---|
| Upgrade command |
|---|
| @vendure/core | npm | < 2.1.3 | 2.1.3 | npm install @vendure/core@2.1.3 |
|---|
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.
v2.1.3
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.
No public exploit code known to Helm's sources (Nuclei templates, Metasploit, Exploit-DB and PoC-in-GitHub). That does not mean none exists.
No EPSS history yet. Either the CVE has no score or the scores have not been fetched.