CVE-2020-15269
JSON

7.4high

Expired token reuse in Spree

Severity
7.4high CVSS:3.1 by GitHub_M
Exploit likelihood
1.06% (higher than 65% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-f8cm-364f-q9qh

Description

In Spree before versions 3.7.11, 4.0.4, or 4.1.11, expired user tokens could be used to access Storefront API v2 endpoints. The issue is patched in versions 3.7.11, 4.0.4 and 4.1.11. A workaround without upgrading is described in the linked advisory.

Affected

Product or packageVersionsReported by
spree spree< 3.7.11, >= 4.0.0, < 4.0.4, >= 4.1.0, < 4.1.11CVE List
spree (RubyGems)before 3.7.11, from 4.0.0 before 4.0.4, from 4.1.0 before 4.1.11GitHub Advisory Database
sparksolutions spreebefore 3.7.11, from 4.0.0 before 4.0.4, from 4.1.0 before 4.1.11NVD

All scores

GitHub_M7.4high CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N
GitHub7.4high CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N
NVD9.1critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
NVD6.4medium CVSS:2.0AV:N/AC:L/Au:N/C:P/I:P/A:N

Classification

What each source says

CVE List

In Spree before versions 3.7.11, 4.0.4, or 4.1.11, expired user tokens could be used to access Storefront API v2 endpoints. The issue is patched in versions 3.7.11, 4.0.4 and 4.1.11. A workaround without upgrading is described in the linked advisory.

GitHub Advisory Database
Impact

The perpetrator who previously obtained an old expired user token could use it to access Storefront API v2 endpoints.

Patches

Please upgrade to 3.7.11, 4.0.4, or 4.1.11 depending on your used Spree version.

Workarounds

In your project directory create a decorator file app/controllers/spree/api/v2/base_controller_decotatror.rb with contents:

module Spree
  module Api
    module V2
      module BaseControllerDecorator
        private

        def spree_current_user
          return nil unless doorkeeper_token
          return @spree_current_user if @spree_current_user

          doorkeeper_authorize!

          @spree_current_user ||= ::Spree.user_class.find_by(id: doorkeeper_token.resource_owner_id)
        end
     end
  end
end

Spree::Api::V2::BaseController.prepend(Spree::Api::V2::BaseControllerDecorator)
For more information

If you have any questions or comments about this advisory:

NVD (es)

En Spree versiones anteriores a 3.7.11, 4.0.4 o 4.1.11, los tokens de usuario vencidos podrían ser usados para acceder a los endpoints de Storefront API versión v2.&#xa0;El problema está parcheado en las versiones 3.7.11, 4.0.4 y 4.1.11.&#xa0;Una solución alternativa sin actualizar es descrita en el aviso vinculado

References

Sources

SourceRecordLicence
CVE ListCVE-2020-15269 changed 2024-08-04CVE Terms of Use
GitHub Advisory DatabaseGHSA-f8cm-364f-q9qh changed 2026-07-08CC-BY-4.0
NVDCVE-2020-15269 changed 2026-06-17Public domain