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 package | Versions | Reported by |
|---|---|---|
| spree spree | < 3.7.11, >= 4.0.0, < 4.0.4, >= 4.1.0, < 4.1.11 | CVE List |
| spree (RubyGems) | before 3.7.11, from 4.0.0 before 4.0.4, from 4.1.0 before 4.1.11 | GitHub Advisory Database |
| sparksolutions spree | before 3.7.11, from 4.0.0 before 4.0.4, from 4.1.0 before 4.1.11 | NVD |
All scores
| GitHub_M | 7.4high CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N |
| GitHub | 7.4high CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N |
| NVD | 9.1critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N |
| NVD | 6.4medium CVSS:2.0 | AV: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:
- Email us at security@spreecommerce.org
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. El problema está parcheado en las versiones 3.7.11, 4.0.4 y 4.1.11. Una solución alternativa sin actualizar es descrita en el aviso vinculado
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2020-15269 changed 2024-08-04 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-f8cm-364f-q9qh changed 2026-07-08 | CC-BY-4.0 |
| NVD | CVE-2020-15269 changed 2026-06-17 | Public domain |