RubySec

Providing security resources for the Ruby community

CVE-2026-22589 (spree_core): Spree API has Unauthenticated IDOR - Guest Address

ADVISORIES

GEM

spree_core

SEVERITY

CVSS v3.x: 7.5 (High)

UNAFFECTED VERSIONS

  • < 4.0.0

PATCHED VERSIONS

  • ~> 4.10.2
  • ~> 5.0.7
  • ~> 5.1.9
  • >= 5.2.5

DESCRIPTION

Summary

An Unauthenticated Insecure Direct Object Reference (IDOR) vulnerability was identified that allows an unauthenticated attacker to access guest address information without supplying valid credentials or session cookies.

Details

During testing, it was observed that all guest users can make an unauthenticated request to retrieve address data belonging to other guest users by manipulating object identifiers. The attacker would need to know the storefront URL structure to perform this attack (which can be learnt after creating a registered user account).

Affected Component(s)

  • Address Edit endpoint: /addresses/{addressId}/edit

Root Cause

  • Faulty authorization check in CanCanCan Ability class:
- can :manage,  ::Spree::Address, user_id: user.id
+ can :manage, ::Spree::Address, user_id: user.id if user.persisted?

the user object in Spree::Ability class for guest users is a Spree.user_class.new object.

Addresses endpoint to access it is part of the spree_storefront gem. Headless builds using APIs are not affected, as the Addresses endpoint there is only for registered users, and records are scoped to the currently signed-in user.

Impact

An unauthenticated attacker can:

  • Enumerate and retrieve guest address information (Addresses associated with User accounts are NOT affected)
  • Access personally identifiable information (PII) such as:
  • Full names
  • Physical addresses
  • Phone numbers (if present)

This vulnerability could lead to:

  • Privacy violations
  • Regulatory compliance issues (e.g., GDPR)
  • Loss of user trust"

RELATED