Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. @vendure/core
  4. ›
  5. GMS-2023-4466

GMS-2023-4466: @vendure/core's insecure currencyCode handling allows wrong payment amounts

November 17, 2023

Impact

Currently, in many Vendure deployments it’s possible to select any currencyCode (really any, does not 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.

References

  • github.com/advisories/GHSA-wm63-7627-ch33
  • github.com/vendure-ecommerce/vendure/commit/5e506fd8ba9f7e20030c329e62af1140d906121f
  • github.com/vendure-ecommerce/vendure/security/advisories/GHSA-wm63-7627-ch33

Code Behaviors & Features

Detect and mitigate GMS-2023-4466 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 2.1.3

Fixed versions

  • 2.1.3

Solution

Upgrade to version 2.1.3 or above.

Source file

npm/@vendure/core/GMS-2023-4466.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:14:51 +0000.