CVE-2026-22589: Spree core Spree API Has Unauthenticated IDOR Vulnerability

HIGH
Advisory Identifier: GHSA-3ghg-3787-w2xr
CVSS 7.5
CWE-639
Published
Advisory Summary

CVE-2026-22589 is a HIGH (CVSS 7.5) spree api has unauthenticated idor vulnerability (CWE-639: Authorization Bypass Through User-Controlled Key) affecting Spree core libraries in the RubyGems ecosystem. The issue involves spree api has unauthenticated idor - guest address. Remediation is available by upgrading affected packages to version 4.10.2, 5.0.7, 5.1.9, 5.2.5.

CVE-2026-22589 at a Glance

CVE Identifier CVE-2026-22589
GHSA Identifier GHSA-3ghg-3787-w2xr
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-639: Authorization Bypass Through User-Controlled Key
Affected Product Spree core
Package Ecosystem RubyGems
Published Date
Last Updated

Security Impact

CVSS: 7.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2026-22589

To remediate this vulnerability, upgrade all affected Spree core dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

spree_core fixed: 4.10.2
Upgrade spree_core to 4.10.2
spree_core fixed: 5.0.7
Upgrade spree_core to 5.0.7
spree_core fixed: 5.1.9
Upgrade spree_core to 5.1.9
spree_core fixed: 5.2.5
Upgrade spree_core to 5.2.5
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for spree_core

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-22589, inspect your project dependencies for Spree core:

inspect dependencies for spree_core

Analyze the terminal output to locate any version of Spree core in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.10.2), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-639: Authorization Bypass Through User-Controlled Key, where the system's authorization functionality does not prevent one user from gaining access to another user's data or record by modifying the key value identifying the data. In Spree core, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### 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: ```diff - 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` <img width="291" height="454" alt="IDOR Guest" src="https://github.com/user-attachments/assets/d21d01a2-8fa5-4ab1-b9e2-6ee65bd6b5a2" /> Repeat the request and check the response, in this example using Guest Address id = 2. **Request** GET `/addresses/2/edit` [<img width="360" height="519" alt="IDOR Guest Address ID 2" src="https://github.com/user-attachments/assets/1ce35990-3d11-4f47-9bba-266b5361313c" /> ](url) ### 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

CVE-2026-22589 Affected Spree core Versions

4 component(s)
Fixed Versions:
4.10.25.0.75.1.95.2.5
Product / Package Ecosystem Affected Versions Fixed Version
spree_core
RubyGems
≥ 4.0.0
< 4.10.2
4.10.2
spree_core
RubyGems
≥ 5.0.0
< 5.0.7
5.0.7
spree_core
RubyGems
≥ 5.1.0
< 5.1.9
5.1.9
spree_core
RubyGems
≥ 5.2.0
< 5.2.5
5.2.5

References

Frequently Asked Questions

What is CVE-2026-22589?
CVE-2026-22589 is a security vulnerability in Spree core involving Spree API has Unauthenticated IDOR - Guest Address under CWE-639: Authorization Bypass Through User-Controlled Key.
Which Spree core versions are affected?
Affected versions include releases prior to 4.10.2, 5.0.7, 5.1.9, 5.2.5 across affected packages: spree_core.
What version fixes CVE-2026-22589?
Upgrading to 4.10.2, 5.0.7, 5.1.9, 5.2.5 (or the latest patched release for your respective branch) resolves the vulnerability.
Is spree_core affected?
Yes, spree_core is affected in releases prior to 4.10.2, 5.0.7, 5.1.9, 5.2.5. Upgrade your dependency to 4.10.2, 5.0.7, 5.1.9, 5.2.5 or later.
What is the CVSS score of CVE-2026-22589?
CVE-2026-22589 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2026-22589?
CVE-2026-22589 is classified under CWE-639: Authorization Bypass Through User-Controlled Key (The system's authorization functionality does not prevent one user from gaining access to another user's data or record by modifying the key value identifying the data.).
How can I check RubyGems dependencies for CVE-2026-22589?
Run the dependency tree command: 'inspect dependencies for spree_core'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-3ghg-3787-w2xr",
  "modified" : "2026-01-11T14:56:25Z",
  "published" : "2026-01-08T21:28:04Z",
  "aliases" : [ "CVE-2026-22589" ],
  "summary" : "Spree API has Unauthenticated IDOR - Guest Address",
  "details" : "### Summary\nAn 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.\n\n### Details\nDuring 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).\n\nAffected Component(s)\n* Address Edit endpoint: `/addresses/{addressId}/edit`\n\nRoot Cause\n- Faulty authorization check in CanCanCan Ability class:\n\n```diff\n- can :manage, ::Spree::Address, user_id: user.id\n+ can :manage, ::Spree::Address, user_id: user.id if user.persisted?\n```\n\nthe `user` object in `Spree::Ability` class for guest users is a `Spree.user_class.new` object. \n\nAddresses 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.\n\n### PoC\nPreconditions\n- No authentication required\n- No cookies or session tokens set\n\nTo reproduce this vulnerability simply perform the request shown below, replacing the number with an arbitrary value. \n\n**For the initial request the Guest Address id = 6 is used to obtain the information**\n\n**Request**\nGET `/addresses/6/edit`\n\n<img width=\"291\" height=\"454\" alt=\"IDOR Guest\" src=\"https://github.com/user-attachments/assets/d21d01a2-8fa5-4ab1-b9e2-6ee65bd6b5a2\" />\n\nRepeat the request and check the response, in this example using Guest Address id = 2.\n\n**Request**\nGET `/addresses/2/edit`\n\n[<img width=\"360\" height=\"519\" alt=\"IDOR Guest Address ID 2\" src=\"https://github.com/user-attachments/assets/1ce35990-3d11-4f47-9bba-266b5361313c\" />\n](url)\n\n### Impact\nAn unauthenticated attacker can:\n\n- Enumerate and retrieve guest address information (Addresses associated with User accounts are NOT affected)\n- Access personally identifiable information (PII) such as:\n- Full names\n- Physical addresses\n- Phone numbers (if present)\n\nThis vulnerability could lead to:\n\n- Privacy violations\n- Regulatory compliance issues (e.g., GDPR)\n- Loss of user trust",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "spree_core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.0.0"
      }, {
        "fixed" : "4.10.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "spree_core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.0.0"
      }, {
        "fixed" : "5.0.7"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "spree_core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.1.0"
      }, {
        "fixed" : "5.1.9"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "spree_core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.2.0"
      }, {
        "fixed" : "5.2.5"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/spree/spree/security/advisories/GHSA-3ghg-3787-w2xr"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-22589"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/spree/spree/commit/16067def6de8e0742d55313e83b0fbab6d2fd795"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/spree/spree/commit/4c2bd62326fba0d846fd9e4bad2c62433829b3ad"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/spree/spree/commit/d051925778f24436b62fa8e4a6b842c72ca80a67"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/spree/spree/commit/e1cff4605eb15472904602aebaf8f2d04852d6ad"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/spree_core/CVE-2026-22589.yml"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/spree/spree"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-639" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-01-08T21:28:04Z",
    "nvd_published_at" : "2026-01-10T04:16:01Z"
  }
}