CVE-2020-15269 is a critical-severity (CVSS 9.1) Improper Authentication vulnerability in spree. A fix is available for spree — see the affected versions and patch details below.
Ensure that doorkeeper_token is valid when authenticating requests in API v2 calls
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
CVE-2020-15269 by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.
Where this sits among everything scored
Of 385,738 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Counts from FIRST.org, log-scaled.
Real-World Exposure
spree💎spree💎spreeReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects RubyGems packages — download data is not available via public APIs for these ecosystems.
Description
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 [email protected]
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 💎RubyGems | spree | all versions | 3.7.11bundle update spree --conservative |
| 💎RubyGems | spree | ≥ 4.0.0&&< 4.0.4 | 4.0.4bundle update spree --conservative |
| 💎RubyGems | spree | ≥ 4.1.0&&< 4.1.11 | 4.1.11bundle update spree --conservative |
Affected Products
spreesparksolutionsDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for spree, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update spree to 3.7.11 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2020-15269 is resolved across your whole dependency graph.
Workarounds
Put an independent control in front of the weakness: restrict the affected endpoint or interface to trusted networks, require an additional authentication factor or proxy-level check, and invalidate existing sessions and credentials in case the flaw has already been used.
Frequently Asked Questions
Is CVE-2020-15269 in your dependencies?
Find it across RubyGems, including transitive dependencies.