CVE-2026-22589
JSON

7.5high

Spree API has Unauthenticated IDOR - Guest Address

Severity
7.5high CVSS:3.1 by GitHub_M
Exploit likelihood
0.64% (higher than 45% of CVEs)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-3ghg-3787-w2xr

Description

Spree is an open source e-commerce solution built with Ruby on Rails. Prior to versions 4.10.2, 5.0.7, 5.1.9, and 5.2.5, 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. This issue has been patched in versions 4.10.2, 5.0.7, 5.1.9, and 5.2.5.

Affected

Product or packageVersionsReported by
spree spree>= 5.2.0, < 5.2.5, >= 5.1.0, < 5.1.9, >= 5.0.0, < 5.0.7, < 4.10.2CVE List
spree_core (RubyGems)from 4.0.0 before 4.10.2, from 5.0.0 before 5.0.7, from 5.1.0 before 5.1.9, from 5.2.0 before 5.2.5GitHub Advisory Database
spreecommerce spreebefore 4.10.2, from 5.0.0 before 5.0.7, from 5.1.0 before 5.1.9, from 5.2.0 before 5.2.5NVD

All scores

GitHub_M7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
GitHub7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

Classification

CWE-639

SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial.

What each source says

CVE List

Spree is an open source e-commerce solution built with Ruby on Rails. Prior to versions 4.10.2, 5.0.7, 5.1.9, and 5.2.5, 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. This issue has been patched in versions 4.10.2, 5.0.7, 5.1.9, and 5.2.5.

GitHub Advisory Database
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.

PoC

Preconditions

  • No authentication required
  • No cookies or session tokens set

To reproduce this vulnerability simply perform the request shown below, replacing the number with an arbitrary value.

For the initial request the Guest Address id = 6 is used to obtain the information

Request GET /addresses/6/edit

IDOR Guest

Repeat the request and check the response, in this example using Guest Address id = 2.

Request GET /addresses/2/edit

IDOR Guest Address ID 2

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
NVD (es)

Spree es una solución de comercio electrónico de código abierto construida con Ruby on Rails. Antes de las versiones 4.10.2, 5.0.7, 5.1.9 y 5.2.5, se identificó una vulnerabilidad de Referencia Directa a Objeto Insegura No Autenticada (IDOR) que permite a un atacante no autenticado acceder a información de dirección de invitado sin proporcionar credenciales válidas o cookies de sesión. Este problema ha sido parcheado en las versiones 4.10.2, 5.0.7, 5.1.9 y 5.2.5.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-22589 changed 2026-01-12CVE Terms of Use
GitHub Advisory DatabaseGHSA-3ghg-3787-w2xr changed 2026-02-03CC-BY-4.0
NVDCVE-2026-22589 changed 2026-06-17Public domain