First published: Fri Nov 17 2023(Updated: )
### 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](https://docs.vendure.io/guides/core-concepts/orders/#intercepting-a-state-transition) which can verify the order's `currencyCode` is as expected before allowing the transition to the `ArrangingPayment` state.
|Affected Software||Affected Version||How to fix|
The vulnerability allows users to select any currency code and pay through Mollie and Stripe without the prices being transformed properly.
In many Vendure deployments, this vulnerability allows users to select any currency code and make payments without proper price transformations.
The severity of the vulnerability is medium with a CVSS score of 5.3.
To fix the vulnerability, update Vendure to version 2.1.3 or higher.
You can find more information about the vulnerability at the following references: - [GitHub Security Advisory](https://github.com/vendure-ecommerce/vendure/security/advisories/GHSA-wm63-7627-ch33) - [GitHub Commit](https://github.com/vendure-ecommerce/vendure/commit/5e506fd8ba9f7e20030c329e62af1140d906121f) - [Advisory on GitHub](https://github.com/advisories/GHSA-wm63-7627-ch33)