Vulnerabilities in pkg:gem/spree_core
PACKAGECVE-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.
pkg:gem/spree_core
Vulnerability advisories affecting package pkg:gem/spree_core. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-3ghg-3787-w2xr | CVE-2026-22589 | HIGH | Spree API has Unauthenticated IDOR - Guest Address |
CVE-2026-22589 at a Glance
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).
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.
Upgrade spree_core to 4.10.2
Upgrade spree_core to 5.0.7
Upgrade spree_core to 5.1.9
Upgrade spree_core to 5.2.5
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
CVE-2026-22589 Affected Spree core Versions
4 component(s)| 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?
Which Spree core versions are affected?
What version fixes CVE-2026-22589?
Is spree_core affected?
What is the CVSS score of CVE-2026-22589?
What CWE is associated with CVE-2026-22589?
How can I check RubyGems dependencies for CVE-2026-22589?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"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"
}
}