{"id":"CVE-2026-22589","aliases":["GHSA-3ghg-3787-w2xr"],"url":"https://o3.security/vulnerability/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","published":"2026-01-10T03:17:58.494Z","modified":"2026-08-12T03:51:08.708679944Z","cvss":{"score":7.5,"severity":"HIGH","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"},"epss":{"score":0.00383,"percentile":0.31094,"asOf":"2026-08-08"},"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"RubyGems","name":"spree_core","fixedVersion":"4.10.2"},{"ecosystem":"RubyGems","name":"spree_core","fixedVersion":"5.0.7"},{"ecosystem":"RubyGems","name":"spree_core","fixedVersion":"5.1.9"},{"ecosystem":"RubyGems","name":"spree_core","fixedVersion":"5.2.5"}],"fix":{"url":"https://github.com/spree/spree/commit/16067def6de8e0742d55313e83b0fbab6d2fd795","label":"spree/spree@16067de"},"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/22xxx/CVE-2026-22589.json"},{"type":"ADVISORY","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":"FIX","url":"https://github.com/spree/spree/commit/16067def6de8e0742d55313e83b0fbab6d2fd795"},{"type":"FIX","url":"https://github.com/spree/spree/commit/4c2bd62326fba0d846fd9e4bad2c62433829b3ad"},{"type":"FIX","url":"https://github.com/spree/spree/commit/d051925778f24436b62fa8e4a6b842c72ca80a67"},{"type":"FIX","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"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-08-12T03:51:08.708679944Z"}}